@wowok/agent-mcp 3.0.6 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/location-match.js +1 -1
- package/dist/goal/GoalClassifier.js +1 -1
- package/dist/graph/onchain/analyze.d.ts +3 -3
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/edge-schema.d.ts +1 -1
- package/dist/graph/onchain/edge-schema.js +1 -1
- package/dist/graph/onchain/interest.js +1 -1
- package/dist/graph/onchain/sdk-dataplane.js +1 -1
- package/dist/graph/onchain/types.d.ts +5 -5
- package/dist/harness/verify.js +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/allocation-ledger.d.ts +2 -0
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocation-puzzle.js +1 -1
- package/dist/knowledge/allocation-risk.d.ts +2 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-field-cognition.d.ts +48 -0
- package/dist/knowledge/guard-field-cognition.js +1 -0
- package/dist/knowledge/index.d.ts +1 -0
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/recipient-constraint.d.ts +6 -1
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/service-allocator-audit-node.d.ts +3 -0
- package/dist/knowledge/service-allocator-audit-node.js +1 -0
- package/dist/knowledge/service-risk-node.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +2 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/persona/strategy-intent.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/intent-analyzer.js +1 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/playbooks/service-build/topology-query.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/safety/preview.js +1 -1
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +6 -6
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/operations.d.ts +4 -2
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/bi.d.ts +16 -14
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +10 -10
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +9 -9
- package/dist/schemas/account_operation.schema.json +3 -3
- package/dist/schemas/bridge_operation.output.json +9 -9
- package/dist/schemas/bridge_operation.schema.json +4 -4
- package/dist/schemas/evaluation_operation.output.json +6 -6
- package/dist/schemas/evaluation_operation.schema.json +5 -5
- package/dist/schemas/guard2file.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/keeper_operation.output.json +9 -9
- package/dist/schemas/local_history_operation.output.json +9 -9
- package/dist/schemas/local_history_operation.schema.json +1 -1
- package/dist/schemas/local_info_operation.output.json +9 -9
- package/dist/schemas/local_mark_operation.output.json +9 -9
- package/dist/schemas/machineNode2file.schema.json +1 -1
- package/dist/schemas/messenger_operation.output.json +9 -9
- package/dist/schemas/monitor_events.output.json +9 -9
- package/dist/schemas/monitor_subscription.output.json +9 -9
- package/dist/schemas/onchain_events.output.json +10 -10
- package/dist/schemas/onchain_operations.output.json +9 -9
- package/dist/schemas/onchain_operations.schema.json +70 -72
- package/dist/schemas/onchain_operations_allocation.schema.json +6 -6
- package/dist/schemas/onchain_operations_arbitration.schema.json +4 -4
- package/dist/schemas/onchain_operations_contact.schema.json +3 -3
- package/dist/schemas/onchain_operations_demand.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +2 -2
- package/dist/schemas/onchain_operations_machine.schema.json +5 -5
- package/dist/schemas/onchain_operations_order.schema.json +3 -3
- package/dist/schemas/onchain_operations_payment.schema.json +3 -3
- package/dist/schemas/onchain_operations_permission.schema.json +3 -3
- package/dist/schemas/onchain_operations_personal.schema.json +1 -1
- package/dist/schemas/onchain_operations_progress.schema.json +3 -3
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_repository.schema.json +3 -3
- package/dist/schemas/onchain_operations_reward.schema.json +7 -7
- package/dist/schemas/onchain_operations_service.schema.json +12 -14
- package/dist/schemas/onchain_operations_treasury.schema.json +9 -9
- package/dist/schemas/onchain_table_data.output.json +17 -13
- package/dist/schemas/query_toolkit.output.json +50 -52
- package/dist/schemas/query_toolkit.schema.json +6 -2
- package/dist/strategy/collectors.js +1 -1
- package/dist/task/playbook.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/evaluation.spec.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/monitor.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ROLE_MOVE_MECHANISMS}from'../role/profiles.js';import{SUPPORTED_INDUSTRIES}from'../persona/types.js';const LEVER_WHITELIST=new Set(ROLE_MOVE_MECHANISMS);export const INDUSTRY_STRATEGIES=[{'industry':'education','benchmark':'Coursera\x20/\x20Outschool','priority_tier':0x1,'launch_window':'M1–M3','pricing':{'default_model_id':'per_lesson_escrow','models':[{'id':'per_lesson_escrow','name':'Per-lesson\x20escrow\x20release','applicable_when':'Attendance-based\x20tutoring/courses\x20delivered\x20in\x20N\x20lessons\x20(the\x20core\x20education\x20fit).','upside':'Prepaid\x20tuition\x20never\x20lands\x20with\x20the\x20institution;\x20each\x20lesson\x20fee\x20releases\x20on\x20the\x20parent\x27s\x20attendance\x20signature\x20in\x20seconds;\x20withdrawal\x20refunds\x20unearned\x20lessons\x20in\x20one\x20transaction.','risks':'Requires\x20an\x20attendance-confirmable\x20scenario;\x20purely\x20recorded/self-paced\x20courses\x20are\x20a\x20mismatch\x20(route\x20to\x20subscription).','wowok_levers':['Allocator','Guard','Machine','Order'],'recommended':!![]},{'id':'package_prepaid_raterelease','name':'Package\x20price\x20with\x20rate-based\x20release','applicable_when':'30-lesson\x20packages\x20/\x20term\x20packages\x20where\x20the\x20family\x20pays\x20once\x20up\x20front.','upside':'High\x20AOV\x20(~¥3,000\x20anchor)\x20while\x20funds\x20release\x201/N\x20per\x20completed\x20lesson\x20—\x20the\x20\x27unearned\x20tuition\x20can\x20never\x20be\x20embezzled\x27\x20guarantee\x20is\x20verifiable\x20on-chain.','risks':'Must\x20declare\x20refund\x20policy\x20up\x20front;\x20setting_lock_duration\x20should\x20lock\x20the\x20fee\x20schedule\x20(default\x2030\x20days).','wowok_levers':['Allocator','Guard','CompensationFund','Arbitration']},{'id':'trial_then_enroll','name':'Trial-class\x20conversion\x20price','applicable_when':'Cold-start\x20acquisition\x20of\x20parents\x20via\x20a\x20single\x20low-commitment\x20trial\x20lesson.','upside':'Trial\x20class\x20in\x20escrow,\x20remainder\x20only\x20after\x20the\x20parent\x20signs\x20enrollment;\x20pairs\x20with\x20referral\x20reward.','risks':'Trial\x20discount\x20must\x20stay\x20above\x20hard\x20delivery\x20cost;\x20not\x20a\x20perpetual\x20loss\x20leader.','wowok_levers':['Reward','Allocator','Guard']}]},'postures':{'volume':{'posture':'volume','thesis':'Maximize\x20enrolled\x20families\x20via\x20group-buy\x20/\x20early-bird\x20and\x20KOC\x20parent\x20communities;\x20trust\x20transparency\x20is\x20the\x20conversion\x20weapon.','tradeoffs':'Lower\x20per-seat\x20margin;\x20heavier\x20campaign/operations\x20load\x20in\x20M1–M2.','guardrails':['Never\x20discount\x20below\x20per-lesson\x20delivery\x20cost','Keep\x20arbitration\x20bound\x20and\x20compensation\x20fund\x20covered\x20at\x20every\x20promo\x20tier','Per-lesson\x20escrow\x20release\x20is\x20mandatory\x20even\x20on\x20discounted\x20packages']},'balanced':{'posture':'balanced','thesis':'Mix\x20institutional\x20direct\x20sales\x20(high-AOV\x20compliance\x20positioning)\x20with\x20parent-community\x20KOC\x20growth.','tradeoffs':'Slower\x20than\x20pure\x20volume,\x20lower\x20margin\x20ceiling\x20than\x20premium\x20small-class.','guardrails':['Per-lesson\x20escrow\x20release\x20mandatory','Refund\x20policy\x20declared\x20before\x20payment','Recorded-only\x20products\x20routed\x20to\x20subscription,\x20not\x20sold\x20as\x20attendance\x20courses']},'margin':{'posture':'margin','thesis':'Sell\x20compliance\x20itself\x20to\x20mid-size\x20institutions:\x20on-chain\x20custody\x20as\x20a\x20competitive\x20moat,\x20premium\x20positioning\x20to\x20burned-by-failure\x20parents.','tradeoffs':'Long\x20BD\x20cycles\x20(¥1,500–3,000\x20cost\x20per\x20signed\x20institution),\x20few\x20but\x20large\x20accounts.','guardrails':['Do\x20not\x20soften\x20escrow/fund\x20requirements\x20to\x20win\x20a\x20large\x20account','\x27Protocol\x20custody\x27\x20claims\x20need\x20the\x20locked\x20fee\x20schedule\x20to\x20back\x20them']}},'competitor_watch':{'dimensions':['headline\x20price\x20vs\x20escrow\x20structure','arbitration\x20availability','compensation\x20fund\x20coverage','per-lesson\x20release\x20granularity','refund-window\x20terms'],'cadence':'weekly','cadence_days':0x7,'differentiation':['Compete\x20on\x20verifiable\x20fund\x20safety\x20(parents\x20can\x20read\x20the\x20Allocation\x20themselves),\x20never\x20on\x20headline\x20discount','Lead\x20with\x20\x27teacher\x20settlement\x20in\x20seconds\x27\x20to\x20attract师资\x20as\x20well\x20as\x20parents']},'acquisition':{'channels':[{'channel':'Parent-rights\x20/\x20local\x20parent\x20KOC\x20communities','priority':0x1,'rationale':'The\x20angry\x20stock\x20from\x20tuition-failure\x20cases\x20concentrates\x20here;\x20trust\x20products\x20sell\x20through\x20trusted\x20channels\x20(¥30–80\x20per\x20paying\x20parent).'},{'channel':'Institutional\x20direct\x20BD\x20(1:1)','priority':0x2,'rationale':'Supply\x20side\x20decides\x20the\x20two-sided\x20cold\x20start;\x20one\x20institution\x20brings\x20its\x20whole\x20parent\x20base.'},{'channel':'Industry\x20media\x20/\x20policy\x20white-papers','priority':0x3,'rationale':'Zero-ad\x20spend\x20endorsement\x20during\x20the\x20next\x20regulatory\x20news\x20cycle.'},{'channel':'Paid\x20ads','priority':0x4,'rationale':'Conflicts\x20with\x20the\x20trust\x20narrative;\x20do\x20not\x20use\x20within\x20the\x20first\x2090\x20days.'}],'campaign_paradigm':'Two\x2090-day\x20campaigns:\x20(A)\x20\x27tuition\x20transparency\x20experiment\x27\x20—\x20two\x20parallel\x20classes,\x20traditional\x20vs\x20escrow,\x20open\x20on-chain\x20comparison,\x20parent\x20open-day\x20live\x20withdrawal\x20refund\x20demo;\x20(B)\x20\x27regulatory\x20answer\x27\x20white-paper\x20on\x20protocol\x20custody,\x20no\x20ads.','reward_orientation':'Milestone\x20(course\x20completion)\x20reward\x20+\x20referral\x20cashback;\x20trial-class\x20discount\x20as\x20the\x20cold-start\x20hook.','discount_orientation':'Early-bird\x20and\x20group-buy\x20only\x20during\x20campaign\x20windows;\x20student-aid\x20discount\x20as\x20targeted,\x20not\x20blanket,\x20price\x20cuts.'},'conversion_retention':['Show\x20the\x20escrow\x20contract\x20balance\x20and\x20per-lesson\x20release\x20records\x20before\x20payment\x20(on-chain\x20verification\x20page).','Convert\x20trial\x20families\x20with\x20the\x20live\x20\x27unearned\x20funds\x20are\x20still\x20yours\x27\x20demonstration.','Renew\x20via\x20per-lesson\x20release\x20history\x20+\x20attendance\x20record;\x20sibling/referral\x20reward\x20beats\x20discounting.'],'unit_economics':{'formula':'extra\x20per\x20order\x20=\x20legacy\x20platform\x20fee\x20rate\x20×\x20AOV\x20−\x20(WoW\x20gas\x20+\x20keeper\x20amortization\x20+\x20one-time\x20migration\x20cost)','anchors':[{'metric':'AOV\x20anchor\x20(30-lesson\x20package)','value':'¥3,000'},{'metric':'Legacy\x20combined\x20fee','value':'Outschool\x2030%\x20≈\x20¥900/order'},{'metric':'WoW\x20per-order\x20cost\x20(N+2\x20txns)','value':'gas\x20≈\x20$0.05–2.5'},{'metric':'Extra\x20earnings\x20per\x20order','value':'≈\x20¥890'}],'target_margin_pct_min':0x19,'cost_floor':'Never\x20price\x20a\x20package\x20below\x20total\x20teacher-cost-per-lesson\x20×\x20lessons;\x20compensation\x20fund\x20must\x20stay\x20covered.','breakeven_note':'Migration/setup\x20cost\x20amortizes\x20over\x20the\x20first\x20package;\x20gas\x20is\x20negligible\x20vs\x20¥900\x20saved.'},'success_patterns':[{'pattern':'Run\x20the\x20parallel-class\x20transparency\x20experiment\x20with\x20one\x20anchor\x20institution\x20and\x20open\x20all\x20escrow\x20data.','evidence':'KPI:\x201\x20anchor,\x20≥30\x20escrow\x20orders,\x20verifiable\x20case\x20piece,\x20parent\x20NPS\x20≥60.'},{'pattern':'Sign\x20institutions\x20through\x20direct\x20BD\x20and\x20let\x20each\x20bring\x20its\x20parent\x20base.','evidence':'90-day\x20gate:\x20≥10\x20institutions\x20beyond\x20the\x20seed;\x20BD\x20cost\x20¥1,500–3,000\x20each.'},{'pattern':'Ship\x20the\x20≤10-dialogue\x20templated\x20onboarding\x20(attendance\x20guard\x20+\x20rate\x20release\x20+\x20lock\x20duration).','evidence':'K1/04\x20validated\x20education\x20shop\x20build\x20in\x2011\x20dialogues.'},{'pattern':'Hold\x20the\x2090-day\x20quality\x20gate\x20before\x20scaling\x20spend.','evidence':'Gate:\x20≥20\x20published\x20Services\x20across\x20tier-1\x20industries,\x20>25%\x20first-to-repeat\x20rate,\x20100%\x20on-chain\x20dispute\x20closure.'}],'red_lines':['Route\x20recorded/self-paced\x20courses\x20to\x20subscription\x20—\x20never\x20sell\x20them\x20as\x20attendance\x20escrow.','Never\x20imply\x20the\x20structure\x20prevents\x20bad\x20teaching;\x20it\x20prevents\x20fund\x20embezzlement\x20(honest\x20boundary).','Marketing\x20figures\x20are\x20fiat-denominated;\x20carry\x20the\x20testnet/estimate/WOW-price\x20disclaimers.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§3','wiki/market/K1/01-行业分析/教育-Coursera.md']},{'industry':'rental','benchmark':'Airbnb\x20/\x20Turo\x20/\x20Getaround','priority_tier':0x1,'launch_window':'M1–M3','pricing':{'default_model_id':'rent_deposit_bundled_escrow','models':[{'id':'rent_deposit_bundled_escrow','name':'Rent\x20+\x20deposit\x20bundled\x20escrow,\x20three-path\x20settlement','applicable_when':'High-value\x20low-frequency\x20rentals\x20(camera\x20gear,\x20machinery,\x20outdoor\x20equipment)\x20and\x20P2P\x20stays\x20with\x20damage\x20disputes.','upside':'Rent\x20and\x20real\x20deposit\x20(not\x20a\x20card\x20auth)\x20are\x20escrowed;\x20three\x20mutually\x20exclusive\x20Allocator\x20paths\x20(clean\x20return\x20/\x20cancellation\x20/\x20graded\x20damage)\x20settle\x20in\x20one\x20~3-second\x20transaction.','risks':'Pre-rental\x20WIP\x20baseline\x20is\x20mandatory\x20—\x20without\x20it\x20the\x20damage\x20guard\x20cannot\x20pass\x20and\x20the\x20value\x20proposition\x20collapses.','wowok_levers':['Allocator','Guard','Machine','WIP','Arbitration'],'recommended':!![]},{'id':'graded_damage_allocator','name':'Pre-agreed\x20graded\x20damage\x20deduction','applicable_when':'Continuous\x20damage\x20amounts\x20(e.g.\x20$347.50\x20claims)\x20need\x20fairness\x20ex\x20ante.','upside':'Light\x2020%\x20/\x20heavy\x2050%\x20/\x20total\x20100%\x20brackets\x20fixed\x20before\x20rental;\x20micro-arbitration\x20only\x20for\x20bracket\x20assignment.','risks':'Brackets\x20must\x20be\x20disclosed\x20and\x20accepted\x20at\x20order\x20time.','wowok_levers':['Allocator','Guard','Arbitration']},{'id':'duration_discount','name':'Long-duration\x20discount\x20ladder','applicable_when':'Idle\x20inventory\x20with\x20low\x20marginal\x20wear\x20cost.','upside':'Monthly\x2010%\x20/\x20quarterly\x2020%\x20/\x20annual\x2030%\x20ladder\x20raises\x20utilization\x20without\x20touching\x20deposit\x20safety.','risks':'Discount\x20must\x20remain\x20above\x20maintenance+depreciation\x20cost\x20per\x20period.','wowok_levers':['Reward','Allocator']}]},'postures':{'volume':{'posture':'volume','thesis':'Win\x20utilization\x20and\x20repeat\x20rentals\x20via\x20credit-accumulation\x20rewards\x20and\x20long-duration\x20discounts;\x20lead\x20supply-side\x20signup\x20with\x20deposit\x20escrow\x20as\x20the筛选器.','tradeoffs':'Thinner\x20per-rental\x20margin;\x20keeper\x20subsidy\x20in\x20seed\x20months.','guardrails':['Pre-rental\x20WIP\x20baseline\x20guard\x20never\x20skipped\x20even\x20for\x20promo\x20rentals','Deposit\x20must\x20be\x20really\x20funded\x20(no\x20zero-deposit\x20waivers\x20in\x20volume\x20mode)']},'balanced':{'posture':'balanced','thesis':'Seed\x20~10\x20vertical\x20merchants\x20with\x20templated\x20builds;\x20balance\x20utilization\x20promos\x20against\x20the\x20verified-case\x20marketing\x20asset.','tradeoffs':'Moderate\x20growth,\x20moderate\x20subsidy\x20($20/mo\x20keeper\x20per\x20seed\x20merchant).','guardrails':['All\x20three\x20settlement\x20paths\x20configured\x20on\x20every\x20published\x20service','Independent\x20arbitration\x20bound']},'margin':{'posture':'margin','thesis':'Premium\x20positioning\x20for\x20high-value\x20equipment:\x20renters\x20pay\x20for\x20real,\x20on-chain-verifiable\x20deposit\x20safety\x20and\x203-second\x20returns.','tradeoffs':'Smaller\x20renter\x20pool;\x20longer\x20trust-building\x20cycle.','guardrails':['Never\x20shorten\x20evidence\x20requirements\x20to\x20speed\x20up\x20a\x20premium\x20rental','Damage\x20brackets\x20stay\x20pre-agreed\x20—\x20no\x20discretionary\x20deductions']}},'competitor_watch':{'dimensions':['rent\x20price','whether\x20deposit\x20is\x20actually\x20held\x20(vs\x20card\x20auth)','pre-rental\x20evidence\x20requirement','refund\x20speed','arbitration\x20independence'],'cadence':'biweekly','cadence_days':0xe,'differentiation':['The\x20three\x20k1rent\x20Payment\x20transactions\x20are\x20the\x20marketing:\x20anyone\x20can\x20audit\x20them','Damage\x20claims\x20cannot\x20be\x20weaponized\x20via\x20reviews\x20—\x20settlement\x20is\x20independent\x20of\x20the\x20rating\x20system']},'acquisition':{'channels':[{'channel':'Vertical\x20communities\x20(photography\x20/\x20machinery\x20/\x20outdoor\x20KOC\x20groups)','priority':0x1,'rationale':'Damage-dispute\x20pain\x20is\x20concentrated\x20here\x20(¥50–120\x20per\x20renter-side\x20user).'},{'channel':'Competitors\x27\x20official\x20documents','priority':0x2,'rationale':'Cite\x20Airbnb\x27s\x202026\x20AI-image\x20claim\x20ban\x20and\x20Getaround\x27s\x20shutdown\x20—\x20opponent\x20copy\x20is\x20the\x20best\x20copy.'},{'channel':'On-chain\x20case\x20marketing\x20(auditable\x20rental\x20page)','priority':0x3,'rationale':'\x27Audit\x20this\x20rental\x20yourself\x27\x20open\x20day.'},{'channel':'Second-hand\x20marketplace\x20dispute\x20threads','priority':0x4,'rationale':'Intercept\x20existing\x20pain\x20(\x27this\x20dispute\x20could\x20not\x20happen\x20on\x20WoW\x27).'}],'campaign_paradigm':'(A)\x20\x27Audit\x20this\x20ledger\x20yourself\x27\x20open\x20day\x20around\x20the\x20k1rent\x2010-node\x20machine\x20+\x20three\x20payments;\x20(B)\x20recruit\x2010\x20seed\x20merchants,\x20keeper\x20+\x20first-order\x20gas\x20subsidy\x20for\x203\x20months.','reward_orientation':'Credit\x20accumulation\x20across\x20rentals\x20+\x20referral\x20cashback;\x20rewards\x20tied\x20to\x20verified\x20completed\x20rentals,\x20not\x20signups.','discount_orientation':'Duration\x20ladder\x20(monthly/quarterly/annual);\x20no\x20blanket\x20price\x20cuts.'},'conversion_retention':['Make\x20pre-rental\x20WIP\x20capture\x20a\x20guided,\x20frictionless\x20step\x20—\x20it\x20is\x20the\x20trust\x20moment,\x20not\x20paperwork.','Show\x20historical\x20settlement\x20transactions\x20to\x20first-time\x20renters\x20before\x20they\x20fund.','Re-rental\x20via\x20accumulated\x20credit;\x20long-duration\x20discount\x20ladder\x20for\x20inventory\x20utilization.'],'unit_economics':{'formula':'extra\x20per\x20order\x20=\x20legacy\x20commission\x20rate\x20×\x20rental\x20value\x20−\x20(WoW\x20gas\x20+\x20keeper\x20$5–20/mo\x20amortization)','anchors':[{'metric':'AOV\x20anchor\x20(camera,\x203\x20days)','value':'$200'},{'metric':'Legacy\x20host-side\x20commission','value':'15.5%\x20≈\x20$31/order'},{'metric':'WoW\x20full-cycle\x20cost\x20(k1rent\x20empirical)','value':'≈\x200.05\x20WOW\x20≈\x20¥0.35\x20(5–7\x20txns)'},{'metric':'Deposit\x20refund\x20speed','value':'7–15\x20business\x20days\x20→\x20≈3\x20seconds'}],'target_margin_pct_min':0x1e,'cost_floor':'Rental\x20price\x20must\x20cover\x20maintenance\x20+\x20depreciation\x20+\x20bracket-expected\x20damage;\x20deposit\x20never\x20lent\x20against.','breakeven_note':'At\x20$200\x20AOV\x20the\x20saved\x20$31\x20commission\x20dwarfs\x20gas\x20and\x20keeper\x20cost\x20from\x20the\x20first\x20order.'},'success_patterns':[{'pattern':'Publish\x20the\x20three\x20immutable\x20settlement\x20Payments\x20(clean\x20/\x20cancel\x20/\x20damage)\x20as\x20an\x20interactive\x20audit\x20page.','evidence':'KPI:\x20≥5,000\x20audit-page\x20UV,\x203\x20inbound\x20merchants,\x201\x20organic\x20KOC\x20retelling.'},{'pattern':'Onboard\x2010\x20equipment-rental\x20merchants\x20from\x20the\x20vertical\x20template\x20within\x203\x20months.','evidence':'Gate:\x2010\x20published\x20Services,\x20≥100\x20cumulative\x20orders,\x20zero\x20escalated\x20disputes\x20(all\x20closed\x20via\x20guard\x20or\x20micro-arbitration).'},{'pattern':'Enforce\x20pre-rental\x20WIP\x20baseline\x20as\x20a\x20hard\x20node,\x20turning\x20the\x2020%→70%\x20claim\x20rejection\x20curve\x20upside\x20down.','evidence':'Without\x20baseline\x20evidence\x20traditional\x20platforms\x20reject\x2020%;\x20with\x20missing-date\x20evidence\x20they\x20reject\x2070%.'},{'pattern':'Make\x20keeper\x20auto-return\x20reminders\x20standard\x20onboarding,\x20priced\x20transparently\x20at\x20$5–20/mo.','evidence':'Honest-boundary\x20requirement\x20from\x20k1rent\x20rollout.'}],'red_lines':['Never\x20claim\x20\x27contract-enforced\x27\x20arbitration\x20independence\x20without\x20negative-test\x20backing\x20(P-5\x20lesson).','Damage\x20deduction\x20without\x20pre-rental\x20baseline\x20is\x20forbidden\x20(guard\x20must\x20fail).','Never\x20hide\x20the\x20keeper\x20subscription\x20cost.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§4','wiki/market/K1/01-行业分析/租赁-Airbnb.md']},{'industry':'freelance','benchmark':'Upwork','priority_tier':0x2,'launch_window':'M2–M4','pricing':{'default_model_id':'milestone_escrow_accept','models':[{'id':'milestone_escrow_accept','name':'Milestone\x20escrow\x20with\x20acceptance\x20signature','applicable_when':'Project-based\x20design/translation/dev/copy\x20work\x20deliverable\x20in\x20milestones.','upside':'Funds\x20escrowed\x20at\x20signing;\x20deliver_guard_wip\x20anchors\x20each\x20delivery;\x20client\x20acceptance\x20signature\x20releases\x20in\x20seconds;\x2014-day\x20silence\x20auto-accepts\x20via\x20time\x20guard\x20+\x20keeper.','risks':'Milestones\x20must\x20be\x20objectively\x20verifiable;\x20vague\x20acceptance\x20criteria\x20invite\x20disputes.','wowok_levers':['Allocator','Guard','Machine','WIP','Progress'],'recommended':!![]},{'id':'fixed_deliverable','name':'Fixed-price\x20deliverable\x20with\x20revision\x20loops','applicable_when':'Single-deliverable\x20jobs\x20(logo,\x20translation,\x20article).','upside':'Revision\x20rounds\x20modeled\x20as\x20machine\x20loops;\x20micro-arbitration\x20available\x20at\x20ANY\x20amount.','risks':'Cap\x20revision\x20rounds\x20up\x20front\x20to\x20avoid\x20scope\x20creep.','wowok_levers':['Machine','Guard','Arbitration']},{'id':'demand_reverse_match','name':'Demand-based\x20reverse\x20bidding','applicable_when':'Client\x20posts\x20a\x20Demand\x20and\x20freelancers\x20present;\x20discovery\x20without\x20connect\x20fees.','upside':'Zero\x20bid-entry\x20cost\x20(vs\x20$48–120\x20first-order\x20Connects\x20burn)\x20and\x20~60%\x20zero-reply\x20proposals\x20avoided.','risks':'Presenter\x20quality\x20gating\x20via\x20passport/trust\x20evidence.','wowok_levers':['Demand','DemandPresenter','Passport','Guard']}]},'postures':{'volume':{'posture':'volume','thesis':'Win\x20order\x20count\x20through\x20Demand\x20participation\x20and\x20first-order\x20speed;\x20carry\x20portable\x20Passport\x20reputation\x20across\x20clients.','tradeoffs':'Smaller\x20milestones,\x20more\x20concurrent\x20clients.','guardrails':['Every\x20milestone\x20escrowed\x20before\x20work\x20starts','Never\x20start\x20work\x20on\x20an\x20unescrowed\x20\x27trusted\x20client\x27\x20promise']},'balanced':{'posture':'balanced','thesis':'Mix\x20Demand\x20bidding\x20with\x20referral\x20clients;\x20standardize\x20milestone\x20templates\x20to\x20cut\x20admin\x20time.','tradeoffs':'Moderate\x20pipeline;\x20time\x20invested\x20in\x20WIP\x20evidence\x20discipline.','guardrails':['Auto-accept\x20time\x20guard\x20configured','Arbitration\x20bound\x20even\x20on\x20small\x20jobs\x20(cost\x20is\x20trivial)']},'margin':{'posture':'margin','thesis':'Premium\x20positioning\x20via\x20public\x20on-chain\x20delivery\x20history\x20and\x20WIP\x20quality;\x20refuse\x20hourly-monitoring\x20clients.','tradeoffs':'Fewer,\x20larger\x20projects;\x20longer\x20sales\x20conversation.','guardrails':['Never\x20accept\x20work\x20that\x20requires\x20process\x20surveillance\x20(philosophy\x20mismatch)','Milestone\x20granularity\x20protects\x20margin\x20—\x20no\x20all-or-nothing\x20delivery']}},'competitor_watch':{'dimensions':['effective\x20fee\x20after\x20tiered\x20cuts','escrow\x20availability','settlement\x20speed','arbitration\x20fee\x20floor','reputation\x20portability'],'cadence':'biweekly','cadence_days':0xe,'differentiation':['Portable\x20Passport\x20credentials\x20vs\x20locked\x20JSS','Arbitration\x20at\x20sub-$700\x20values\x20—\x20the\x20exact\x20segment\x20incumbents\x20structurally\x20abandon','Outcome\x20verification\x20(WIP)\x20instead\x20of\x20screen\x20monitoring']},'acquisition':{'channels':[{'channel':'r/freelance,\x20Indie\x20Hackers,\x20nomad\x20communities','priority':0x1,'rationale':'Fee-fatigued\x20mid/long-tail\x20freelancers;\x20est.\x20$3–8\x20per\x20registered\x20freelancer.'},{'channel':'Design/translation\x20vertical\x20communities','priority':0x2,'rationale':'High\x20milestone-delivery\x20fit.'},{'channel':'Demand\x20reverse-match\x20events','priority':0x3,'rationale':'Crack\x20the\x20demand\x20side\x20with\x20real\x20bounties.'},{'channel':'KOC\x20income-transparency\x20program','priority':0x4,'rationale':'5–8\x20mid-tier\x20creators\x20publishing\x20Upwork\x20vs\x20WoW\x20income\x20with\x20auditable\x20addresses\x20after\x20≥20\x20merchants\x20exist.'}],'campaign_paradigm':'\x27$699\x20Arbitration\x20Clinic\x27\x20(M2–M3,\x20only\x20after\x20≥20\x20merchants):\x20publicly\x20resolve\x20sub-$700\x20disputes\x20on-chain,\x20weekly\x20micro-arbitration\x20documentary;\x20KOC\x20transparent-income\x20program\x20with\x20on-chain\x20settlement.','reward_orientation':'Referral\x20and\x20repeat-client\x20rewards;\x20KOC\x20payouts\x20auto-split\x20via\x20Allocation\x20after\x20verified\x20first-order\x20conversion.','discount_orientation':'No\x20fee-discounting\x20narrative\x20—\x20the\x20platform\x20fee\x20is\x20already\x20~0;\x20compete\x20on\x20escrow/arbitration\x20value.'},'conversion_retention':['Convert\x20prospects\x20by\x20showing\x20WIP\x20hashes\x20of\x20similar\x20completed\x20milestones.','Propose\x203–5\x20milestone\x20splits\x20in\x20the\x20first\x20proposal\x20—\x20it\x20signals\x20professionalism\x20and\x20de-risks\x20the\x20client.','Retain\x20via\x20Passport:\x20every\x20clean\x20completion\x20is\x20a\x20portable\x20credential,\x20explicitly\x20say\x20so\x20at\x20delivery.'],'unit_economics':{'formula':'extra\x20per\x20order\x20=\x20legacy\x20fee\x20rate\x20×\x20contract\x20value\x20+\x20avoided\x20connect/arbitration\x20fees\x20−\x20WoW\x20gas','anchors':[{'metric':'AOV\x20anchor\x20(milestone\x20contract)','value':'$1,000'},{'metric':'Legacy\x20take\x20rate','value':'Upwork\x2015.4%\x20≈\x20$154\x20(+\x20client\x203–7.99%)'},{'metric':'Bid\x20entry\x20cost','value':'Connects\x20$48–120\x20first-order;\x20~60%\x20of\x20proposals\x20get\x20no\x20reply'},{'metric':'WoW\x20cost\x20(4–8\x20txns)','value':'gas\x20≈\x20$0.01–0.6;\x20arbitration\x20≈\x20$0.01\x20vs\x20$337.50/party'},{'metric':'Settlement\x20speed','value':'up\x20to\x2027\x20days\x20→\x20seconds\x20on\x20acceptance\x20signature'}],'target_margin_pct_min':0x28,'cost_floor':'Milestone\x20price\x20must\x20cover\x20the\x20quoted\x20hours\x20at\x20the\x20freelancer\x27s\x20minimum\x20hourly\x20rate;\x20no\x20unpaid\x20spec\x20work\x20beyond\x20one\x20proposal.','breakeven_note':'One\x20$1,000\x20contract\x20saves\x20≈$153\x20—\x20adoption\x20pays\x20on\x20the\x20first\x20escrowed\x20job.'},'success_patterns':[{'pattern':'Run\x20the\x20\x27$699\x20Arbitration\x20Clinic\x27\x20with\x20≥10\x20closed\x20micro-arbitrations\x20and\x20publish\x20weekly\x20documentaries.','evidence':'KPI:\x20avg\x20read\x20≥3,000/episode;\x20arbitrator\x20pool\x20≥15.'},{'pattern':'Sign\x205–8\x20mid-tier\x20KOCs\x20with\x20income-guarantee\x20top-ups,\x20settled\x20on-chain\x20after\x20conversion.','evidence':'KPI:\x20≥30\x20registered\x20freelancers\x20per\x20KOC;\x20on-chain\x20conversion\x20≥8%.'},{'pattern':'Standardize\x20the\x2014-day\x20silence\x20auto-acceptance\x20guard\x20on\x20every\x20service.','evidence':'Eliminates\x20the\x20\x27client\x20disappears,\x20funds\x20locked\x27\x20failure\x20mode\x20without\x20weakening\x20buyer\x20protection.'},{'pattern':'Turn\x20down\x20hourly-surveillance\x20clients\x20explicitly.','evidence':'Outcome\x20verification\x20philosophy\x20is\x20the\x20differentiation\x20against\x20Work\x20Diary\x20monitoring.'}],'red_lines':['Do\x20not\x20start\x20work\x20before\x20the\x20milestone\x20is\x20escrowed.','Do\x20not\x20promote\x20reputation\x20portability\x20(Passport)\x20before\x20the\x20issuance\x20UX\x20is\x20production-ready.','Never\x20bid\x20below\x20minimum-rate\x20floor\x20to\x20win\x20volume.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§5','wiki/market/K1/01-行业分析/自由职业-Upwork.md']},{'industry':'travel','benchmark':'Booking\x20/\x20TUI','priority_tier':0x3,'launch_window':'M4+','pricing':{'default_model_id':'multi_segment_release','models':[{'id':'multi_segment_release','name':'Multi-leg\x20itinerary\x20with\x20per-segment\x20release','applicable_when':'Custom/multi-segment\x20packaged\x20trips\x20by\x20small\x20studios\x20(TUI-fit\x2010/10).','upside':'segment_D1..DN\x20machine;\x20each\x20segment\x27s\x20WIP\x20releases\x20its\x20fee;\x20interrupted\x20segments\x20refund\x20in\x20one\x20transaction;\x20fund\x20waterfall\x20fully\x20auditable.','risks':'Sub-providers\x20(hotels/drivers)\x20need\x20not\x20be\x20on-chain\x20initially\x20—\x20the\x20agent\x20is\x20the\x20single\x20on-chain\x20counterparty;\x20adoption\x20bottleneck\x20is\x20why\x20travel\x20is\x20tier\x203.','wowok_levers':['Machine','Allocator','Treasury','Guard','WIP'],'recommended':!![]},{'id':'agent_single_custody','name':'Agent\x20single-counterparty\x20custody','applicable_when':'Downstream\x20suppliers\x20are\x20not\x20on-chain\x20yet.','upside':'Agent↔client\x20escrow\x20closes\x20the\x20trust\x20loop\x20alone;\x20supplier\x20participation\x20grows\x20with\x20network\x20effects.','risks':'Agent\x20must\x20hold\x20correct\x20licensing\x20and\x20fund\x20the\x20compensation\x20coverage.','wowok_levers':['Allocator','Treasury','CompensationFund','Arbitration']},{'id':'weather_guarantee','name':'Weather/condition-guarded\x20pricing','applicable_when':'Weather-sensitive\x20segments\x20can\x20reference\x20an\x20evidence\x20repository.','upside':'Auto-refund\x20triggers\x20via\x20quoted\x20guard\x20+\x20repository\x20oracle\x20—\x20a\x20feature\x20no\x20OTA\x20offers.','risks':'Guard\x20trigger\x20source\x20must\x20be\x20specified\x20and\x20tested\x20before\x20sale.','wowok_levers':['Guard','Allocator','Repository']}]},'postures':{'volume':{'posture':'volume','thesis':'Postpone;\x20volume\x20play\x20only\x20after\x20tier-1/2\x20Passport\x20network\x20lowers\x20cold-start\x20cost.','tradeoffs':'High\x20coordination\x20cost\x20across\x20sub-providers.','guardrails':['Never\x20sell\x20standard\x20standalone\x20flights/hotels\x20(weak\x20WoW\x20value)','Undelivered\x20segments\x20always\x20refundable\x20via\x20the\x20interrupted\x20path']},'balanced':{'posture':'balanced','thesis':'Pilot\x20with\x202–3\x20custom-trip\x20studios\x20on\x20single-counterparty\x20custody;\x20prove\x20the\x20waterfall\x20story.','tradeoffs':'Few\x20pilots,\x20heavy\x20case-building\x20effort\x20($10–15K\x20pilot\x20budget).','guardrails':['Fund\x20waterfall\x20visible\x20to\x20the\x20buyer\x20before\x20payment','Cancellation\x20policy\x20per\x20leg\x20declared\x20up\x20front']},'margin':{'posture':'margin','thesis':'Premium\x20bespoke\x20itineraries\x20priced\x20on\x20trust\x20architecture\x20and\x20transparent\x20waterfall,\x20not\x20OTA\x20discounting.','tradeoffs':'Small\x20high-AOV\x20audience.','guardrails':['Refundable\x20vs\x20non-refundable\x20legs\x20separated\x20explicitly','Never\x20commingle\x20undelivered-segment\x20funds\x20with\x20operating\x20cash']}},'competitor_watch':{'dimensions':['effective\x20commission\x20after\x20Preferred/Genius','waterfall\x20transparency','cancellation\x20terms\x20per\x20leg','downstream\x20refund\x20handling\x20(e.g.\x20EU261\x20gaps)','settlement\x20speed'],'cadence':'monthly','cadence_days':0x1e,'differentiation':['The\x20$2,000\x20waterfall\x20split\x20across\x20hotel/guide/agent\x20is\x20inspectable\x20before\x20purchase','Pre-event\x20isolation\x20vs\x20Thomas-Cook-style\x20post-hoc\x20relief']},'acquisition':{'channels':[{'channel':'Custom-trip\x20studio\x20direct\x20partnerships','priority':0x1,'rationale':'Only\x20segment\x20with\x2010/10\x20fit;\x202–3\x20pilot\x20studios.'},{'channel':'Travel-industry\x20failure\x20news\x20cycles','priority':0x2,'rationale':'Thomas\x20Cook\x20£400M\x20/\x20pandemic\x20$35B\x20refund\x20stories\x20anchor\x20pre-isolation\x20demand.'},{'channel':'Waterfall/weather\x20demo\x20content','priority':0x3,'rationale':'Interactive\x20fund-split\x20and\x20auto-refund\x20demos.'}],'campaign_paradigm':'\x27Transparent\x20waterfall\x27\x20demo\x20($2,000\x20split\x20readable\x20on-chain)\x20+\x20weather-guard\x20auto-refund\x20demo;\x20$10–15K\x20for\x202–3\x20studio\x20pilots,\x20M4–M6.','reward_orientation':'Referral\x20commission\x20for\x20repeat/referral\x20custom\x20trips;\x20flash-sale\x20rewards\x20only\x20for\x20off-peak\x20clearance.','discount_orientation':'Early-bird\x20/\x20group\x20/\x20member\x20pricing\x20within\x20seasons;\x20never\x20discount\x20by\x20hiding\x20non-refundable\x20legs.'},'conversion_retention':['Sell\x20the\x20pre-trip\x20inspection\x20of\x20the\x20entire\x20fund\x20waterfall\x20as\x20the\x20core\x20asset.','Convert\x20with\x20the\x20interrupted-segment\x20one-transaction\x20refund\x20demo.','Re-book\x20via\x20itinerary\x20history\x20and\x20per-leg\x20transparency,\x20not\x20loyalty\x20points.'],'unit_economics':{'formula':'extra\x20per\x20trip\x20=\x20effective\x20OTA\x20commission\x20×\x20trip\x20value\x20−\x20(WoW\x20gas\x20across\x202×segments+3\x20txns)','anchors':[{'metric':'AOV\x20anchor\x20(5-segment\x20custom\x20trip)','value':'$2,000'},{'metric':'Effective\x20legacy\x20commission','value':'25–36%\x20≈\x20$350–720/trip'},{'metric':'WoW\x20cost','value':'gas\x20≈\x20$0.02–1'},{'metric':'Settlement\x20speed','value':'VCC\x202–6\x20weeks\x20→\x20per-segment\x20seconds'}],'target_margin_pct_min':0x23,'cost_floor':'Never\x20collect\x20funds\x20for\x20unbooked\x20legs\x20without\x20the\x20interrupted\x20refund\x20path;\x20compensation\x20coverage\x20sized\x20for\x20max\x20single-segment\x20value.','breakeven_note':'Gas\x20is\x20noise\x20against\x20$350–700\x20saved\x20per\x20trip;\x20the\x20binding\x20constraint\x20is\x20supplier\x20adoption,\x20not\x20economics.'},'success_patterns':[{'pattern':'Pilot\x202–3\x20custom-trip\x20studios\x20with\x20agent-only\x20custody\x20first.','evidence':'Avoids\x20the\x20sub-provider\x20on-chain\x20bottleneck\x20that\x20justifies\x20tier-3\x20timing.'},{'pattern':'Ship\x20the\x20interactive\x20$2,000\x20waterfall\x20visualization\x20as\x20the\x20sales\x20asset.','evidence':'Buys\x20on\x20chain-visible\x20split\x20—\x20unique\x20vs\x20every\x20OTA.'},{'pattern':'Use\x20a\x20weather\x20repository\x20guard\x20for\x20automatic\x20segment\x20refund\x20in\x20one\x20marketed\x20demo.','evidence':'Converts\x20an\x20abstract\x20\x27escrow\x27\x20claim\x20into\x20a\x20visible\x20guarantee.'}],'red_lines':['Do\x20not\x20enter\x20standard\x20flight/hotel\x20resale\x20—\x20WoW\x20value\x20is\x20weak\x20there.','Never\x20market\x20large\x20cross-period\x20custody\x20before\x20stablecoin\x20bridging\x20is\x20ready.','Cross-leg\x20responsibility\x20must\x20be\x20disclosed,\x20not\x20blurred.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§7','wiki/market/K1/01-行业分析/旅游-Booking.md']},{'industry':'retail','benchmark':'Amazon\x20/\x20Etsy','priority_tier':0x3,'launch_window':'M4+','pricing':{'default_model_id':'receipt_confirmed_escrow','models':[{'id':'receipt_confirmed_escrow','name':'Escrow\x20released\x20on\x20confirmed\x20receipt','applicable_when':'Private-traffic\x20sellers\x20(DTC\x20site\x20/\x20community\x20commerce)\x20who\x20already\x20own\x20demand.','upside':'Funds\x20release\x20seconds\x20after\x20receipt\x20guard;\x20return_auth_guard\x20gates\x20fraudulent\x20returns;\x20provenance\x20via\x20repository\x20chain.','risks':'Zero-traffic\x20sellers\x20are\x20a\x20deliberate\x20mismatch\x20—\x20WoW\x20does\x20not\x20replace\x20marketplace\x20demand\x20generation.','wowok_levers':['Allocator','Guard','Repository','Arbitration','CompensationFund'],'recommended':!![]},{'id':'member_bundle_pricing','name':'Member/bundle\x20pricing\x20for\x20private\x20communities','applicable_when':'Community-commerce\x20sellers\x20with\x20repeat\x20purchase\x20cadence.','upside':'Spend-threshold\x20and\x20member\x20pricing\x20via\x20rewards\x20instead\x20of\x20platform\x20TACoS.','risks':'Bundles\x20must\x20still\x20be\x20escrowed\x20per\x20deliverable;\x20no\x20pre-shipment\x20release.','wowok_levers':['Reward','Allocator']}]},'postures':{'volume':{'posture':'volume','thesis':'Turn\x20existing\x20private-traffic\x20flow\x20into\x20escrow\x20GMV;\x20first-order\x20and\x20spend-threshold\x20rewards\x20maximize\x20repeat.','tradeoffs':'Thin\x20unit\x20margin\x20—\x20viable\x20only\x20because\x20gas\x20is\x20<$1\x20per\x20$1,000\x20GMV.','guardrails':['Receipt\x20confirmation\x20guard\x20never\x20bypassed','Compensation\x20fund\x20coverage\x20ratio\x20default\x205×\x20max\x20single\x20order']},'balanced':{'posture':'balanced','thesis':'Pilot\x205–8\x20private-domain\x20sellers;\x20use\x20the\x20gas-bill\x20livestream\x20as\x20the\x20core\x20proof\x20asset.','tradeoffs':'Moderate\x20growth\x20gated\x20by\x20existing\x20audience\x20size.','guardrails':['Return-auth\x20evidence\x20(dual\x20signature\x20/\x20logistics\x20repository)\x20required','Configurable\x20arbitration\x20voting\x20period']},'margin':{'posture':'margin','thesis':'Premium\x20provenance/proven-authenticity\x20selling:\x20repository\x20chain\x20+\x20escrow\x20as\x20anti-counterfeit\x20proof.','tradeoffs':'Niche\x20audience;\x20authenticity\x20verification\x20operations\x20cost.','guardrails':['Never\x20claim\x20authenticity\x20beyond\x20what\x20repository\x20evidence\x20proves','No\x20reserve-period\x20exposure\x20of\x20funds\x20to\x20the\x20seller\x20pre-receipt']}},'competitor_watch':{'dimensions':['headline\x20price','settlement\x20reserve\x20policy','return-fraud\x20handling','arbitration\x20default\x20rulings','provenance\x20evidence'],'cadence':'weekly','cadence_days':0x7,'differentiation':['Settlement\x20in\x20seconds\x20vs\x2014\x20days\x20+\x20DD+90\x20reserve\x20risk','Return\x20fraud\x20requires\x20dual-signed/logistics\x20evidence\x20instead\x20of\x20A-to-z\x20default\x20buyer\x20wins','\x27You\x20pay\x2030%\x20for\x20traffic\x20or\x20trust\x20—\x20we\x20provide\x20trust,\x20you\x20bring\x20traffic\x27']},'acquisition':{'channels':[{'channel':'Existing\x20private-traffic\x20sellers\x20(DTC,\x20community,\x20We-commerce)','priority':0x1,'rationale':'\x27Have\x20traffic,\x20trust\x20is\x20expensive\x27\x20is\x20the\x20filter;\x20zero-traffic\x20sellers\x20are\x20turned\x20away\x20at\x20intake.'},{'channel':'Etsy-refugee\x20targeting','priority':0x2,'rationale':'24.2%\x20fee-increase\x20victim\x20communities.'},{'channel':'Live\x20gas-bill\x20comparison\x20events','priority':0x3,'rationale':'\x27$1,000\x20GMV\x20cost\x20teardown\x27:\x20same\x20shop,\x20WoW\x20vs\x20Amazon\x20$300–350.'}],'campaign_paradigm':'\x27$1,000\x20GMV\x20cost\x27\x20livestream\x20with\x20public\x20full-cycle\x20gas\x20accounting;\x20targeted\x20Etsy-refugee\x20recruitment;\x20$6–10K\x20pilot\x20for\x205–8\x20sellers,\x20M4–M6.','reward_orientation':'First-order\x20discount\x20+\x20spend\x20cashback\x20+\x20spend-threshold\x20rewards\x20inside\x20the\x20owned\x20community.','discount_orientation':'Threshold/limited/member\x20discounts\x20only;\x20no\x20marketplace-style\x20bidding\x20wars.'},'conversion_retention':['Make\x20receipt-confirmation\x20the\x20one-tap\x20trust\x20moment;\x20show\x20release\x20seconds\x20later.','Re-purchase\x20via\x20spend\x20cashback\x20and\x20provenance\x20certificates.','Convert\x20return-averse\x20buyers\x20with\x20the\x20return-auth\x20evidence\x20flow\x20up\x20front.'],'unit_economics':{'formula':'extra\x20per\x20$1,000\x20GMV\x20=\x20legacy\x20combined\x20burden\x20−\x20WoW\x20gas\x20(4–6\x20txns)','anchors':[{'metric':'AOV\x20anchor\x20(private\x20domain)','value':'$50'},{'metric':'Legacy\x20combined\x20burden','value':'Amazon\x2030–35%\x20≈\x20$300–350\x20per\x20$1,000\x20GMV'},{'metric':'WoW\x20cost\x20per\x20$1,000\x20GMV','value':'gas\x20≈\x20$0.01–0.5\x20(<\x20$1)'},{'metric':'Return\x20rate\x20/\x20fraud\x20share','value':'19.3%\x20returns\x20/\x209%\x20fraudulent\x20under\x20incumbent\x20flow'}],'target_margin_pct_min':0x14,'cost_floor':'Never\x20price\x20below\x20COGS\x20+\x20shipping\x20+\x20expected-return-provision;\x20fund\x20coverage\x205×\x20max\x20single\x20order.','breakeven_note':'Economics\x20work\x20at\x20almost\x20any\x20AOV;\x20traffic\x20availability\x20is\x20the\x20only\x20admission\x20criterion.'},'success_patterns':[{'pattern':'Use\x20the\x20honest-boundary\x20intake\x20questionnaire\x20to\x20reject\x20zero-traffic\x20sellers.','evidence':'Raises\x20conversion\x20quality;\x20WoW\x20does\x20not\x20sell\x20traffic\x20(40.5%\x20share\x20value\x20stays\x20with\x20Amazon).\x20'},{'pattern':'Run\x20the\x20public\x20\x27$1,000\x20GMV\x20gas\x20bill\x27\x20livestream\x20with\x20the\x20same\x20shop\x27s\x20orders.','evidence':'Contrasts\x20$300–350\x20incumbent\x20burden\x20vs\x20<$1\x20on-chain\x20cost.'},{'pattern':'Enforce\x20dual-signature/logistics\x20return\x20evidence\x20to\x20structurally\x20raise\x20fraud\x20cost.','evidence':'Targets\x20the\x209%\x20fraudulent\x20share\x20of\x20the\x2019.3%\x20return\x20rate.'},{'pattern':'Recruit\x20Etsy\x20fee-hike\x20refugees\x20directly\x20from\x20victim\x20communities.','evidence':'24.2%\x20unilateral\x20fee\x20increase\x20is\x20the\x20triggering\x20event.'}],'red_lines':['Never\x20promise\x20traffic\x20—\x20WoW\x20is\x20trust\x20infrastructure,\x20not\x20a\x20marketplace\x20demand\x20source.','No\x20auto-default\x20buyer-win\x20rulings;\x20arbitration\x20voting\x20period\x20must\x20be\x20configured.','Physical\x20authenticity\x20claims\x20require\x20repository\x20evidence.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§8','wiki/market/K1/01-行业分析/零售-Amazon.md']},{'industry':'subscription','benchmark':'Patreon\x20/\x20OnlyFans\x20/\x20Apple\x20IAP','priority_tier':0x2,'launch_window':'M2–M4','pricing':{'default_model_id':'per_period_signed_charge','models':[{'id':'per_period_signed_charge','name':'Per-period\x20signed\x20charge\x20with\x20delivery\x20gate','applicable_when':'Creator\x20memberships,\x20newsletters,\x20indie\x20software\x20—\x20recurring\x20digital\x20value.','upside':'charge_guard_signer\x20requires\x20explicit\x20signature\x20every\x20period;\x20deliver_guard_wip\x20blocks\x20the\x20charge\x20when\x20no\x20value\x20was\x20delivered;\x20cancel\x20is\x20one\x20signature;\x20100%\x20Allocation\x20to\x20creator.','risks':'The\x20per-period\x20signature\x20is\x20deliberate\x20friction\x20—\x20sell\x20it\x20as\x20the\x20feature;\x20do\x20not\x20sneak\x20in\x20any\x20auto-renewal\x20path.','wowok_levers':['Guard','Allocator','Machine','Reward'],'recommended':!![]},{'id':'annual_prepaid_period_release','name':'Annual\x20prepay\x20released\x20per\x20period','applicable_when':'Loyal\x20fans\x20wanting\x20a\x20yearly\x20plan;\x20creator\x20wants\x20upfront\x20cash.','upside':'Annual\x20funds\x20escrow\x20and\x20release\x20monthly\x20to\x20the\x20creator\x20—\x20prepaid\x20but\x20protected\x20if\x20the\x20creator\x20stops.','risks':'Stoppage\x20refunds\x20for\x20undelivered\x20months\x20must\x20be\x20structurally\x20guaranteed.','wowok_levers':['Allocator','Guard']},{'id':'tiered_membership','name':'Tiered\x20membership\x20with\x20escalating\x20deliverables','applicable_when':'Creators\x20with\x20multiple\x20value\x20tiers\x20(Patreon-style).','upside':'Each\x20tier\x20maps\x20to\x20its\x20own\x20delivery\x20guard;\x20upgrades/downgrades\x20take\x20effect\x20next\x20period\x20only.','risks':'Tier\x20deliverables\x20must\x20be\x20concrete\x20enough\x20for\x20the\x20delivery\x20guard\x20to\x20evaluate.','wowok_levers':['Machine','Guard','WIP']}]},'postures':{'volume':{'posture':'volume','thesis':'Subscriber\x20count\x20first\x20via\x20the\x20\x27signing\x20movement\x27\x20consumer\x20tool\x20and\x20first-month\x20pricing;\x20keep\x20100%\x20pass-through\x20as\x20the\x20wedge.','tradeoffs':'Conversion\x20funnel\x20includes\x20the\x20signature\x20friction\x20—\x20lean\x20into\x20it\x20as\x20qualification.','guardrails':['Never\x20reintroduce\x20auto-renewal\x20to\x20optimize\x20conversion','Delivery\x20gate\x20on\x20every\x20charge']},'balanced':{'posture':'balanced','thesis':'Balance\x20acquisition\x20(subscription\x20checkup\x20tool)\x20with\x20retention\x20(100%\x20arrival\x20day\x20rituals).','tradeoffs':'Moderate\x20growth;\x20investment\x20in\x20per-period\x20value\x20proof.','guardrails':['Fee\x20schedule\x20frozen\x20at\x20publish','Cancellation\x20one\x20signature,\x20no\x20retention\x20dark\x20patterns']},'margin':{'posture':'margin','thesis':'Fewer,\x20higher-paying\x20true\x20fans;\x20per-period\x20signing\x20filters\x20for\x20committed\x20members\x20and\x20supports\x20premium\x20tiers.','tradeoffs':'Smaller\x20list,\x20higher\x20ARPU.','guardrails':['No\x20IAP-style\x2030%\x20channel\x20accepted\x20—\x20direct\x20settlement\x20is\x20the\x20product','Stoppage\x20protection\x20advertised\x20and\x20enforced']}},'competitor_watch':{'dimensions':['take\x20rate\x20and\x20unilateral\x20change\x20history','charge\x20transparency','cancellation\x20click\x20count','stopped-creator\x20policy','time-to-payout'],'cadence':'weekly','cadence_days':0x7,'differentiation':['13\x20years\x20/\x20three\x20unilateral\x20Patreon\x20price\x20rises\x20are\x20structurally\x20impossible\x20(published\x20allocation\x20is\x20frozen)','Charge\x20without\x20delivery\x20cannot\x20pass\x20—\x20an\x20industry\x20blank','15-option\x20cancel\x20maze\x20→\x20one\x20signature\x20(FTC\x20$2.5B\x20settlement\x20context)']},'acquisition':{'channels':[{'channel':'Creator\x20communities\x20(Discord,\x20Patreon\x20forums)','priority':0x1,'rationale':'Survival-line\x20creators\x20($131–180\x20median\x20monthly)\x20feel\x20the\x2010–20%\x20fee\x20directly\x20($2–5\x20per\x20subscriber).'},{'channel':'Newsletter\x20/\x20indie-dev\x20circles','priority':0x2,'rationale':'Apple\x20IAP\x2030%\x20+\x2075-day\x20payout\x20float\x20pain.'},{'channel':'Hacker\x20News\x20/\x20anti-dark-pattern\x20audience','priority':0x3,'rationale':'Values\x20alignment\x20beats\x20ad\x20spend.'}],'campaign_paradigm':'\x27Signing\x20Movement\x27\x20(M2–M4):\x20consumer-side\x20subscription\x20checkup\x20widget\x20(2.5×\x20spend\x20underestimate\x20/\x2042%\x20unused\x20data)\x20+\x20creator\x20\x27100%\x20arrival\x20day\x27\x20monthly\x20chain-receipt\x20posts;\x20$4–7K,\x20keyed\x20to\x20FTC/price-hike\x20news\x20cycles.','reward_orientation':'Loyalty\x20+\x20referral\x20rewards\x20only;\x20first-month\x20price\x20as\x20the\x20single\x20acquisition\x20discount.','discount_orientation':'Annual\x20/\x20team\x20/\x20upgrade\x20discounts\x20—\x20never\x20discount\x20by\x20hiding\x20renewal\x20terms.'},'conversion_retention':['Onboard\x20creators\x20by\x20migrating\x20one\x20tier\x20first\x20and\x20showing\x20the\x20per-period\x20release\x20receipts.','Retain\x20with\x20the\x20\x27unused\x20month\x27\x20guarantee:\x20no\x20delivery\x20→\x20no\x20charge.','Convert\x20fans\x20with\x20the\x20cancellation\x20demo\x20(15\x20options\x20→\x201\x20signature).'],'unit_economics':{'formula':'extra\x20per\x20year\x20=\x20legacy\x20take\x20rate\x20×\x20annual\x20subscription\x20revenue\x20−\x20WoW\x20gas\x20(2\x20txns/period)','anchors':[{'metric':'Monthly\x20anchor','value':'$100/month\x20($1,200/year)'},{'metric':'Legacy\x20take','value':'Patreon\x2010%\x20≈\x20$10/month;\x20iOS\x20IAP\x2030%'},{'metric':'WoW\x20annual\x20cost\x20(12\x20periods)','value':'gas\x20≈\x20$0.03–2/year'},{'metric':'Payout\x20speed','value':'IAP\x20up\x20to\x2075-day\x20float\x20→\x20seconds\x20each\x20period'}],'target_margin_pct_min':0x3c,'cost_floor':'Creator\x20must\x20keep\x20delivering\x20per-period\x20value;\x20no\x20charge\x20passes\x20without\x20delivery\x20evidence.','breakeven_note':'≈$120/year\x20extra\x20on\x20a\x20single\x20$100/month\x20membership.'},'success_patterns':[{'pattern':'Ship\x20the\x20subscription-checkup\x20widget\x20before\x20creator\x20outreach.','evidence':'KPI:\x20≥20,000\x20checkups;\x20consumer\x20demand\x20pulls\x20creators.'},{'pattern':'Run\x20monthly\x20\x27100%\x20arrival\x20day\x27\x20with\x20public\x20chain\x20receipts.','evidence':'30\x20creators\x20onboard\x20target;\x20turns\x20payout\x20into\x20recurring\x20proof.'},{'pattern':'Publish\x20the\x20one-signature\x20cancellation\x20video.','evidence':'KPI:\x20≥100K\x20views\x20—\x20contrast\x20with\x20the\x204-page/6-click/15-option\x20incumbent\x20flow.'},{'pattern':'Capture\x20education\x20recorded-course\x20overflow\x20traffic.','evidence':'Routing\x20rule:\x20recorded\x20courses\x20→\x20subscription,\x20keeping\x20both\x20fits\x20clean.'}],'red_lines':['Never\x20implement\x20or\x20imply\x20auto-renewal\x20—\x20every\x20period\x20is\x20signed.','Never\x20charge\x20a\x20period\x20without\x20delivery\x20evidence.','No\x20rate\x20lock\x20claims\x20except\x20through\x20published\x20frozen\x20Allocation.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§6','wiki/market/K1/01-行业分析/订阅-Patreon.md']}];const STRATEGY_BY_INDUSTRY=new Map(INDUSTRY_STRATEGIES['map'](a=>[a['industry'],a]));export function registerIndustryStrategy(a){STRATEGY_BY_INDUSTRY['set'](a['industry'],a);}export function unregisterIndustryStrategy(a){const b=INDUSTRY_STRATEGIES['find'](c=>c['industry']===a);if(b)return STRATEGY_BY_INDUSTRY['set'](a,b),!![];return STRATEGY_BY_INDUSTRY['delete'](a);}export function getIndustryStrategy(a){return STRATEGY_BY_INDUSTRY['get'](a['toLowerCase']());}export function listIndustryStrategies(){return SUPPORTED_INDUSTRIES['map'](a=>STRATEGY_BY_INDUSTRY['get'](a))['filter'](a=>a!==undefined);}export function stageFromOrderCount(a){if(a>=0x32)return'optimization';if(a>=0x14)return'mature';if(a>=0x5)return'growing';return'cold_start';}export function recommendStrategy(a,b='balanced',c,d){const e=getIndustryStrategy(a);if(!e||e['pricing']['models']['length']===0x0)return null;const f=c??(d?.['order_count']!==undefined?stageFromOrderCount(d['order_count']):'cold_start');let g=e['pricing']['models']['find'](j=>j['id']===e['pricing']['default_model_id'])??e['pricing']['models'][0x0];if(b==='volume'){const j=e['pricing']['models']['find'](k=>/(?:^|_)(discount|trial|first|bundle|member)(?:_|$)/i['test'](k['id']))??g;g=j;}else{if(b==='margin'&&e['pricing']['models']['length']>0x1){const k=e['pricing']['models']['find'](l=>/premium|graded|tiered|guarantee|prepaid/i['test'](l['id']));if(k)g=k;}}const h=[],i=(l,m)=>{if(l&&h['length']<0x3)h['push'](m);};return i(f==='cold_start','Cold\x20start:\x20publish\x20the\x20service\x20with\x20the\x20\x22'+g['name']+'\x22\x20model\x20and\x20bound\x20Arbitration\x20+\x20compensation\x20fund\x20first;\x20seed\x20the\x20anchor\x20trust\x20case\x20before\x20discounting.'),d?.['dispute_rate']!==undefined&&i(d['dispute_rate']>0.05,'Dispute\x20rate\x20'+(d['dispute_rate']*0x64)['toFixed'](0x1)+'%\x20exceeds\x205%:\x20tighten\x20pre-delivery\x20evidence\x20guards\x20and\x20pause\x20promotions\x20until\x20closure\x20is\x20back\x20on-chain.'),d?.['repeat_customer_rate']!==undefined&&i(d['repeat_customer_rate']<0.25&&f!=='cold_start','Repeat\x20rate\x20'+(d['repeat_customer_rate']*0x64)['toFixed'](0x0)+'%\x20is\x20below\x20the\x2025%\x20K1\x20gate:\x20add\x20a\x20repeat/referral\x20reward\x20and\x20review\x20post-delivery\x20follow-up\x20rather\x20than\x20cutting\x20price.'),d?.['order_count']!==undefined&&i(b==='volume'&&d['order_count']>=0x5&&d['order_count']<0x32,'Growing\x20stage\x20under\x20volume\x20posture:\x20run\x20the\x20cataloged\x20acquisition\x20campaign\x20('+(e['acquisition']['channels'][0x0]?.['channel']??'top\x20channel')+')\x20with\x20reward—not\x20blanket\x20discount—orientation.'),i(h['length']===0x0,b+'\x20posture:\x20hold\x20the\x20\x22'+g['name']+'\x22\x20model,\x20run\x20the\x20'+e['competitor_watch']['cadence']+'\x20competitor\x20watch\x20('+e['competitor_watch']['dimensions']['slice'](0x0,0x3)['join'](',\x20')+'),\x20and\x20keep\x20all\x20guardrails:\x20'+e['postures'][b]['guardrails'][0x0]),{'industry':e['industry'],'posture':b,'stage':f,'pricing_model_id':g['id'],'pricing_model_name':g['name'],'actions':h['slice'](0x0,0x3)};}export function validateStrategyLevers(a){const b=[];for(const c of a['pricing']['models']){for(const d of c['wowok_levers']){!LEVER_WHITELIST['has'](d)&&b['push'](a['industry']+'.'+c['id']+':\x20unknown\x20WoW\x20lever\x20\x27'+d+'\x27');}}return b;}
|
|
1
|
+
import{ROLE_MOVE_MECHANISMS}from'../role/profiles.js';import{SUPPORTED_INDUSTRIES}from'../persona/types.js';const LEVER_WHITELIST=new Set(ROLE_MOVE_MECHANISMS);export const INDUSTRY_STRATEGIES=[{'industry':'education','benchmark':'Coursera\x20/\x20Outschool','priority_tier':0x1,'launch_window':'M1–M3','pricing':{'default_model_id':'per_lesson_escrow','models':[{'id':'per_lesson_escrow','name':'Per-lesson\x20escrow\x20release','applicable_when':'Attendance-based\x20tutoring/courses\x20delivered\x20in\x20N\x20lessons\x20(the\x20core\x20education\x20fit).','upside':'Prepaid\x20tuition\x20never\x20lands\x20with\x20the\x20institution;\x20each\x20lesson\x20fee\x20releases\x20on\x20the\x20parent\x27s\x20attendance\x20signature\x20in\x20seconds;\x20withdrawal\x20refunds\x20unearned\x20lessons\x20in\x20one\x20transaction.','risks':'Requires\x20an\x20attendance-confirmable\x20scenario;\x20purely\x20recorded/self-paced\x20courses\x20are\x20a\x20mismatch\x20(route\x20to\x20subscription).','wowok_levers':['Allocator','Guard','Machine','Order'],'recommended':!![]},{'id':'package_prepaid_raterelease','name':'Package\x20price\x20with\x20rate-based\x20release','applicable_when':'30-lesson\x20packages\x20/\x20term\x20packages\x20where\x20the\x20family\x20pays\x20once\x20up\x20front.','upside':'High\x20AOV\x20(~¥3,000\x20anchor)\x20while\x20funds\x20release\x201/N\x20per\x20completed\x20lesson\x20—\x20the\x20\x27unearned\x20tuition\x20can\x20never\x20be\x20embezzled\x27\x20guarantee\x20is\x20verifiable\x20on-chain.','risks':'Must\x20declare\x20refund\x20policy\x20up\x20front;\x20setting_lock_duration\x20should\x20lock\x20the\x20fee\x20schedule\x20(default\x2030\x20days).','wowok_levers':['Allocator','Guard','CompensationFund','Arbitration']},{'id':'trial_then_enroll','name':'Trial-class\x20conversion\x20price','applicable_when':'Cold-start\x20acquisition\x20of\x20parents\x20via\x20a\x20single\x20low-commitment\x20trial\x20lesson.','upside':'Trial\x20class\x20in\x20escrow,\x20remainder\x20only\x20after\x20the\x20parent\x20signs\x20enrollment;\x20pairs\x20with\x20referral\x20reward.','risks':'Trial\x20discount\x20must\x20stay\x20above\x20hard\x20delivery\x20cost;\x20not\x20a\x20perpetual\x20loss\x20leader.','wowok_levers':['Reward','Allocator','Guard']}]},'postures':{'volume':{'posture':'volume','thesis':'Maximize\x20enrolled\x20families\x20via\x20group-buy\x20/\x20early-bird\x20and\x20KOC\x20parent\x20communities;\x20trust\x20transparency\x20is\x20the\x20conversion\x20weapon.','tradeoffs':'Lower\x20per-seat\x20margin;\x20heavier\x20campaign/operations\x20load\x20in\x20M1–M2.','guardrails':['Never\x20discount\x20below\x20per-lesson\x20delivery\x20cost','Keep\x20arbitration\x20bound\x20and\x20compensation\x20fund\x20covered\x20at\x20every\x20promo\x20tier','Per-lesson\x20escrow\x20release\x20is\x20mandatory\x20even\x20on\x20discounted\x20packages']},'balanced':{'posture':'balanced','thesis':'Mix\x20institutional\x20direct\x20sales\x20(high-AOV\x20compliance\x20positioning)\x20with\x20parent-community\x20KOC\x20growth.','tradeoffs':'Slower\x20than\x20pure\x20volume,\x20lower\x20margin\x20ceiling\x20than\x20premium\x20small-class.','guardrails':['Per-lesson\x20escrow\x20release\x20mandatory','Refund\x20policy\x20declared\x20before\x20payment','Recorded-only\x20products\x20routed\x20to\x20subscription,\x20not\x20sold\x20as\x20attendance\x20courses']},'margin':{'posture':'margin','thesis':'Sell\x20compliance\x20itself\x20to\x20mid-size\x20institutions:\x20on-chain\x20custody\x20as\x20a\x20competitive\x20moat,\x20premium\x20positioning\x20to\x20burned-by-failure\x20parents.','tradeoffs':'Long\x20BD\x20cycles\x20(¥1,500–3,000\x20cost\x20per\x20signed\x20institution),\x20few\x20but\x20large\x20accounts.','guardrails':['Do\x20not\x20soften\x20escrow/fund\x20requirements\x20to\x20win\x20a\x20large\x20account','\x27Protocol\x20custody\x27\x20claims\x20need\x20the\x20locked\x20fee\x20schedule\x20to\x20back\x20them']}},'competitor_watch':{'dimensions':['headline\x20price\x20vs\x20escrow\x20structure','arbitration\x20availability','compensation\x20fund\x20coverage','per-lesson\x20release\x20granularity','refund-window\x20terms'],'cadence':'weekly','cadence_days':0x7,'differentiation':['Compete\x20on\x20verifiable\x20fund\x20safety\x20(parents\x20can\x20read\x20the\x20Allocation\x20themselves),\x20never\x20on\x20headline\x20discount','Lead\x20with\x20\x27teacher\x20settlement\x20in\x20seconds\x27\x20to\x20attract\x20teachers\x20as\x20well\x20as\x20parents']},'acquisition':{'channels':[{'channel':'Parent-rights\x20/\x20local\x20parent\x20KOC\x20communities','priority':0x1,'rationale':'The\x20angry\x20stock\x20from\x20tuition-failure\x20cases\x20concentrates\x20here;\x20trust\x20products\x20sell\x20through\x20trusted\x20channels\x20(¥30–80\x20per\x20paying\x20parent).'},{'channel':'Institutional\x20direct\x20BD\x20(1:1)','priority':0x2,'rationale':'Supply\x20side\x20decides\x20the\x20two-sided\x20cold\x20start;\x20one\x20institution\x20brings\x20its\x20whole\x20parent\x20base.'},{'channel':'Industry\x20media\x20/\x20policy\x20white-papers','priority':0x3,'rationale':'Zero-ad\x20spend\x20endorsement\x20during\x20the\x20next\x20regulatory\x20news\x20cycle.'},{'channel':'Paid\x20ads','priority':0x4,'rationale':'Conflicts\x20with\x20the\x20trust\x20narrative;\x20do\x20not\x20use\x20within\x20the\x20first\x2090\x20days.'}],'campaign_paradigm':'Two\x2090-day\x20campaigns:\x20(A)\x20\x27tuition\x20transparency\x20experiment\x27\x20—\x20two\x20parallel\x20classes,\x20traditional\x20vs\x20escrow,\x20open\x20on-chain\x20comparison,\x20parent\x20open-day\x20live\x20withdrawal\x20refund\x20demo;\x20(B)\x20\x27regulatory\x20answer\x27\x20white-paper\x20on\x20protocol\x20custody,\x20no\x20ads.','reward_orientation':'Milestone\x20(course\x20completion)\x20reward\x20+\x20referral\x20cashback;\x20trial-class\x20discount\x20as\x20the\x20cold-start\x20hook.','discount_orientation':'Early-bird\x20and\x20group-buy\x20only\x20during\x20campaign\x20windows;\x20student-aid\x20discount\x20as\x20targeted,\x20not\x20blanket,\x20price\x20cuts.'},'conversion_retention':['Show\x20the\x20escrow\x20contract\x20balance\x20and\x20per-lesson\x20release\x20records\x20before\x20payment\x20(on-chain\x20verification\x20page).','Convert\x20trial\x20families\x20with\x20the\x20live\x20\x27unearned\x20funds\x20are\x20still\x20yours\x27\x20demonstration.','Renew\x20via\x20per-lesson\x20release\x20history\x20+\x20attendance\x20record;\x20sibling/referral\x20reward\x20beats\x20discounting.'],'unit_economics':{'formula':'extra\x20per\x20order\x20=\x20legacy\x20platform\x20fee\x20rate\x20×\x20AOV\x20−\x20(WoW\x20gas\x20+\x20keeper\x20amortization\x20+\x20one-time\x20migration\x20cost)','anchors':[{'metric':'AOV\x20anchor\x20(30-lesson\x20package)','value':'¥3,000'},{'metric':'Legacy\x20combined\x20fee','value':'Outschool\x2030%\x20≈\x20¥900/order'},{'metric':'WoW\x20per-order\x20cost\x20(N+2\x20txns)','value':'gas\x20≈\x20$0.05–2.5'},{'metric':'Extra\x20earnings\x20per\x20order','value':'≈\x20¥890'}],'target_margin_pct_min':0x19,'cost_floor':'Never\x20price\x20a\x20package\x20below\x20total\x20teacher-cost-per-lesson\x20×\x20lessons;\x20compensation\x20fund\x20must\x20stay\x20covered.','breakeven_note':'Migration/setup\x20cost\x20amortizes\x20over\x20the\x20first\x20package;\x20gas\x20is\x20negligible\x20vs\x20¥900\x20saved.'},'success_patterns':[{'pattern':'Run\x20the\x20parallel-class\x20transparency\x20experiment\x20with\x20one\x20anchor\x20institution\x20and\x20open\x20all\x20escrow\x20data.','evidence':'KPI:\x201\x20anchor,\x20≥30\x20escrow\x20orders,\x20verifiable\x20case\x20piece,\x20parent\x20NPS\x20≥60.'},{'pattern':'Sign\x20institutions\x20through\x20direct\x20BD\x20and\x20let\x20each\x20bring\x20its\x20parent\x20base.','evidence':'90-day\x20gate:\x20≥10\x20institutions\x20beyond\x20the\x20seed;\x20BD\x20cost\x20¥1,500–3,000\x20each.'},{'pattern':'Ship\x20the\x20≤10-dialogue\x20templated\x20onboarding\x20(attendance\x20guard\x20+\x20rate\x20release\x20+\x20lock\x20duration).','evidence':'K1/04\x20validated\x20education\x20shop\x20build\x20in\x2011\x20dialogues.'},{'pattern':'Hold\x20the\x2090-day\x20quality\x20gate\x20before\x20scaling\x20spend.','evidence':'Gate:\x20≥20\x20published\x20Services\x20across\x20tier-1\x20industries,\x20>25%\x20first-to-repeat\x20rate,\x20100%\x20on-chain\x20dispute\x20closure.'}],'red_lines':['Route\x20recorded/self-paced\x20courses\x20to\x20subscription\x20—\x20never\x20sell\x20them\x20as\x20attendance\x20escrow.','Never\x20imply\x20the\x20structure\x20prevents\x20bad\x20teaching;\x20it\x20prevents\x20fund\x20embezzlement\x20(honest\x20boundary).','Marketing\x20figures\x20are\x20fiat-denominated;\x20carry\x20the\x20testnet/estimate/WOW-price\x20disclaimers.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§3','wiki/market/K1/01-行业分析/教育-Coursera.md']},{'industry':'rental','benchmark':'Airbnb\x20/\x20Turo\x20/\x20Getaround','priority_tier':0x1,'launch_window':'M1–M3','pricing':{'default_model_id':'rent_deposit_bundled_escrow','models':[{'id':'rent_deposit_bundled_escrow','name':'Rent\x20+\x20deposit\x20bundled\x20escrow,\x20three-path\x20settlement','applicable_when':'High-value\x20low-frequency\x20rentals\x20(camera\x20gear,\x20machinery,\x20outdoor\x20equipment)\x20and\x20P2P\x20stays\x20with\x20damage\x20disputes.','upside':'Rent\x20and\x20real\x20deposit\x20(not\x20a\x20card\x20auth)\x20are\x20escrowed;\x20three\x20mutually\x20exclusive\x20Allocator\x20paths\x20(clean\x20return\x20/\x20cancellation\x20/\x20graded\x20damage)\x20settle\x20in\x20one\x20~3-second\x20transaction.','risks':'Pre-rental\x20WIP\x20baseline\x20is\x20mandatory\x20—\x20without\x20it\x20the\x20damage\x20guard\x20cannot\x20pass\x20and\x20the\x20value\x20proposition\x20collapses.','wowok_levers':['Allocator','Guard','Machine','WIP','Arbitration'],'recommended':!![]},{'id':'graded_damage_allocator','name':'Pre-agreed\x20graded\x20damage\x20deduction','applicable_when':'Continuous\x20damage\x20amounts\x20(e.g.\x20$347.50\x20claims)\x20need\x20fairness\x20ex\x20ante.','upside':'Light\x2020%\x20/\x20heavy\x2050%\x20/\x20total\x20100%\x20brackets\x20fixed\x20before\x20rental;\x20micro-arbitration\x20only\x20for\x20bracket\x20assignment.','risks':'Brackets\x20must\x20be\x20disclosed\x20and\x20accepted\x20at\x20order\x20time.','wowok_levers':['Allocator','Guard','Arbitration']},{'id':'duration_discount','name':'Long-duration\x20discount\x20ladder','applicable_when':'Idle\x20inventory\x20with\x20low\x20marginal\x20wear\x20cost.','upside':'Monthly\x2010%\x20/\x20quarterly\x2020%\x20/\x20annual\x2030%\x20ladder\x20raises\x20utilization\x20without\x20touching\x20deposit\x20safety.','risks':'Discount\x20must\x20remain\x20above\x20maintenance+depreciation\x20cost\x20per\x20period.','wowok_levers':['Reward','Allocator']}]},'postures':{'volume':{'posture':'volume','thesis':'Win\x20utilization\x20and\x20repeat\x20rentals\x20via\x20credit-accumulation\x20rewards\x20and\x20long-duration\x20discounts;\x20lead\x20supply-side\x20signup\x20with\x20deposit\x20escrow\x20as\x20the\x20filter.','tradeoffs':'Thinner\x20per-rental\x20margin;\x20keeper\x20subsidy\x20in\x20seed\x20months.','guardrails':['Pre-rental\x20WIP\x20baseline\x20guard\x20never\x20skipped\x20even\x20for\x20promo\x20rentals','Deposit\x20must\x20be\x20really\x20funded\x20(no\x20zero-deposit\x20waivers\x20in\x20volume\x20mode)']},'balanced':{'posture':'balanced','thesis':'Seed\x20~10\x20vertical\x20merchants\x20with\x20templated\x20builds;\x20balance\x20utilization\x20promos\x20against\x20the\x20verified-case\x20marketing\x20asset.','tradeoffs':'Moderate\x20growth,\x20moderate\x20subsidy\x20($20/mo\x20keeper\x20per\x20seed\x20merchant).','guardrails':['All\x20three\x20settlement\x20paths\x20configured\x20on\x20every\x20published\x20service','Independent\x20arbitration\x20bound']},'margin':{'posture':'margin','thesis':'Premium\x20positioning\x20for\x20high-value\x20equipment:\x20renters\x20pay\x20for\x20real,\x20on-chain-verifiable\x20deposit\x20safety\x20and\x203-second\x20returns.','tradeoffs':'Smaller\x20renter\x20pool;\x20longer\x20trust-building\x20cycle.','guardrails':['Never\x20shorten\x20evidence\x20requirements\x20to\x20speed\x20up\x20a\x20premium\x20rental','Damage\x20brackets\x20stay\x20pre-agreed\x20—\x20no\x20discretionary\x20deductions']}},'competitor_watch':{'dimensions':['rent\x20price','whether\x20deposit\x20is\x20actually\x20held\x20(vs\x20card\x20auth)','pre-rental\x20evidence\x20requirement','refund\x20speed','arbitration\x20independence'],'cadence':'biweekly','cadence_days':0xe,'differentiation':['The\x20three\x20k1rent\x20Payment\x20transactions\x20are\x20the\x20marketing:\x20anyone\x20can\x20audit\x20them','Damage\x20claims\x20cannot\x20be\x20weaponized\x20via\x20reviews\x20—\x20settlement\x20is\x20independent\x20of\x20the\x20rating\x20system']},'acquisition':{'channels':[{'channel':'Vertical\x20communities\x20(photography\x20/\x20machinery\x20/\x20outdoor\x20KOC\x20groups)','priority':0x1,'rationale':'Damage-dispute\x20pain\x20is\x20concentrated\x20here\x20(¥50–120\x20per\x20renter-side\x20user).'},{'channel':'Competitors\x27\x20official\x20documents','priority':0x2,'rationale':'Cite\x20Airbnb\x27s\x202026\x20AI-image\x20claim\x20ban\x20and\x20Getaround\x27s\x20shutdown\x20—\x20opponent\x20copy\x20is\x20the\x20best\x20copy.'},{'channel':'On-chain\x20case\x20marketing\x20(auditable\x20rental\x20page)','priority':0x3,'rationale':'\x27Audit\x20this\x20rental\x20yourself\x27\x20open\x20day.'},{'channel':'Second-hand\x20marketplace\x20dispute\x20threads','priority':0x4,'rationale':'Intercept\x20existing\x20pain\x20(\x27this\x20dispute\x20could\x20not\x20happen\x20on\x20WoW\x27).'}],'campaign_paradigm':'(A)\x20\x27Audit\x20this\x20ledger\x20yourself\x27\x20open\x20day\x20around\x20the\x20k1rent\x2010-node\x20machine\x20+\x20three\x20payments;\x20(B)\x20recruit\x2010\x20seed\x20merchants,\x20keeper\x20+\x20first-order\x20gas\x20subsidy\x20for\x203\x20months.','reward_orientation':'Credit\x20accumulation\x20across\x20rentals\x20+\x20referral\x20cashback;\x20rewards\x20tied\x20to\x20verified\x20completed\x20rentals,\x20not\x20signups.','discount_orientation':'Duration\x20ladder\x20(monthly/quarterly/annual);\x20no\x20blanket\x20price\x20cuts.'},'conversion_retention':['Make\x20pre-rental\x20WIP\x20capture\x20a\x20guided,\x20frictionless\x20step\x20—\x20it\x20is\x20the\x20trust\x20moment,\x20not\x20paperwork.','Show\x20historical\x20settlement\x20transactions\x20to\x20first-time\x20renters\x20before\x20they\x20fund.','Re-rental\x20via\x20accumulated\x20credit;\x20long-duration\x20discount\x20ladder\x20for\x20inventory\x20utilization.'],'unit_economics':{'formula':'extra\x20per\x20order\x20=\x20legacy\x20commission\x20rate\x20×\x20rental\x20value\x20−\x20(WoW\x20gas\x20+\x20keeper\x20$5–20/mo\x20amortization)','anchors':[{'metric':'AOV\x20anchor\x20(camera,\x203\x20days)','value':'$200'},{'metric':'Legacy\x20host-side\x20commission','value':'15.5%\x20≈\x20$31/order'},{'metric':'WoW\x20full-cycle\x20cost\x20(k1rent\x20empirical)','value':'≈\x200.05\x20WOW\x20≈\x20¥0.35\x20(5–7\x20txns)'},{'metric':'Deposit\x20refund\x20speed','value':'7–15\x20business\x20days\x20→\x20≈3\x20seconds'}],'target_margin_pct_min':0x1e,'cost_floor':'Rental\x20price\x20must\x20cover\x20maintenance\x20+\x20depreciation\x20+\x20bracket-expected\x20damage;\x20deposit\x20never\x20lent\x20against.','breakeven_note':'At\x20$200\x20AOV\x20the\x20saved\x20$31\x20commission\x20dwarfs\x20gas\x20and\x20keeper\x20cost\x20from\x20the\x20first\x20order.'},'success_patterns':[{'pattern':'Publish\x20the\x20three\x20immutable\x20settlement\x20Payments\x20(clean\x20/\x20cancel\x20/\x20damage)\x20as\x20an\x20interactive\x20audit\x20page.','evidence':'KPI:\x20≥5,000\x20audit-page\x20UV,\x203\x20inbound\x20merchants,\x201\x20organic\x20KOC\x20retelling.'},{'pattern':'Onboard\x2010\x20equipment-rental\x20merchants\x20from\x20the\x20vertical\x20template\x20within\x203\x20months.','evidence':'Gate:\x2010\x20published\x20Services,\x20≥100\x20cumulative\x20orders,\x20zero\x20escalated\x20disputes\x20(all\x20closed\x20via\x20guard\x20or\x20micro-arbitration).'},{'pattern':'Enforce\x20pre-rental\x20WIP\x20baseline\x20as\x20a\x20hard\x20node,\x20turning\x20the\x2020%→70%\x20claim\x20rejection\x20curve\x20upside\x20down.','evidence':'Without\x20baseline\x20evidence\x20traditional\x20platforms\x20reject\x2020%;\x20with\x20missing-date\x20evidence\x20they\x20reject\x2070%.'},{'pattern':'Make\x20keeper\x20auto-return\x20reminders\x20standard\x20onboarding,\x20priced\x20transparently\x20at\x20$5–20/mo.','evidence':'Honest-boundary\x20requirement\x20from\x20k1rent\x20rollout.'}],'red_lines':['Never\x20claim\x20\x27contract-enforced\x27\x20arbitration\x20independence\x20without\x20negative-test\x20backing\x20(P-5\x20lesson).','Damage\x20deduction\x20without\x20pre-rental\x20baseline\x20is\x20forbidden\x20(guard\x20must\x20fail).','Never\x20hide\x20the\x20keeper\x20subscription\x20cost.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§4','wiki/market/K1/01-行业分析/租赁-Airbnb.md']},{'industry':'freelance','benchmark':'Upwork','priority_tier':0x2,'launch_window':'M2–M4','pricing':{'default_model_id':'milestone_escrow_accept','models':[{'id':'milestone_escrow_accept','name':'Milestone\x20escrow\x20with\x20acceptance\x20signature','applicable_when':'Project-based\x20design/translation/dev/copy\x20work\x20deliverable\x20in\x20milestones.','upside':'Funds\x20escrowed\x20at\x20signing;\x20deliver_guard_wip\x20anchors\x20each\x20delivery;\x20client\x20acceptance\x20signature\x20releases\x20in\x20seconds;\x2014-day\x20silence\x20auto-accepts\x20via\x20time\x20guard\x20+\x20keeper.','risks':'Milestones\x20must\x20be\x20objectively\x20verifiable;\x20vague\x20acceptance\x20criteria\x20invite\x20disputes.','wowok_levers':['Allocator','Guard','Machine','WIP','Progress'],'recommended':!![]},{'id':'fixed_deliverable','name':'Fixed-price\x20deliverable\x20with\x20revision\x20loops','applicable_when':'Single-deliverable\x20jobs\x20(logo,\x20translation,\x20article).','upside':'Revision\x20rounds\x20modeled\x20as\x20machine\x20loops;\x20micro-arbitration\x20available\x20at\x20ANY\x20amount.','risks':'Cap\x20revision\x20rounds\x20up\x20front\x20to\x20avoid\x20scope\x20creep.','wowok_levers':['Machine','Guard','Arbitration']},{'id':'demand_reverse_match','name':'Demand-based\x20reverse\x20bidding','applicable_when':'Client\x20posts\x20a\x20Demand\x20and\x20freelancers\x20present;\x20discovery\x20without\x20connect\x20fees.','upside':'Zero\x20bid-entry\x20cost\x20(vs\x20$48–120\x20first-order\x20Connects\x20burn)\x20and\x20~60%\x20zero-reply\x20proposals\x20avoided.','risks':'Presenter\x20quality\x20gating\x20via\x20passport/trust\x20evidence.','wowok_levers':['Demand','DemandPresenter','Passport','Guard']}]},'postures':{'volume':{'posture':'volume','thesis':'Win\x20order\x20count\x20through\x20Demand\x20participation\x20and\x20first-order\x20speed;\x20carry\x20portable\x20Passport\x20reputation\x20across\x20clients.','tradeoffs':'Smaller\x20milestones,\x20more\x20concurrent\x20clients.','guardrails':['Every\x20milestone\x20escrowed\x20before\x20work\x20starts','Never\x20start\x20work\x20on\x20an\x20unescrowed\x20\x27trusted\x20client\x27\x20promise']},'balanced':{'posture':'balanced','thesis':'Mix\x20Demand\x20bidding\x20with\x20referral\x20clients;\x20standardize\x20milestone\x20templates\x20to\x20cut\x20admin\x20time.','tradeoffs':'Moderate\x20pipeline;\x20time\x20invested\x20in\x20WIP\x20evidence\x20discipline.','guardrails':['Auto-accept\x20time\x20guard\x20configured','Arbitration\x20bound\x20even\x20on\x20small\x20jobs\x20(cost\x20is\x20trivial)']},'margin':{'posture':'margin','thesis':'Premium\x20positioning\x20via\x20public\x20on-chain\x20delivery\x20history\x20and\x20WIP\x20quality;\x20refuse\x20hourly-monitoring\x20clients.','tradeoffs':'Fewer,\x20larger\x20projects;\x20longer\x20sales\x20conversation.','guardrails':['Never\x20accept\x20work\x20that\x20requires\x20process\x20surveillance\x20(philosophy\x20mismatch)','Milestone\x20granularity\x20protects\x20margin\x20—\x20no\x20all-or-nothing\x20delivery']}},'competitor_watch':{'dimensions':['effective\x20fee\x20after\x20tiered\x20cuts','escrow\x20availability','settlement\x20speed','arbitration\x20fee\x20floor','reputation\x20portability'],'cadence':'biweekly','cadence_days':0xe,'differentiation':['Portable\x20Passport\x20credentials\x20vs\x20locked\x20JSS','Arbitration\x20at\x20sub-$700\x20values\x20—\x20the\x20exact\x20segment\x20incumbents\x20structurally\x20abandon','Outcome\x20verification\x20(WIP)\x20instead\x20of\x20screen\x20monitoring']},'acquisition':{'channels':[{'channel':'r/freelance,\x20Indie\x20Hackers,\x20nomad\x20communities','priority':0x1,'rationale':'Fee-fatigued\x20mid/long-tail\x20freelancers;\x20est.\x20$3–8\x20per\x20registered\x20freelancer.'},{'channel':'Design/translation\x20vertical\x20communities','priority':0x2,'rationale':'High\x20milestone-delivery\x20fit.'},{'channel':'Demand\x20reverse-match\x20events','priority':0x3,'rationale':'Crack\x20the\x20demand\x20side\x20with\x20real\x20bounties.'},{'channel':'KOC\x20income-transparency\x20program','priority':0x4,'rationale':'5–8\x20mid-tier\x20creators\x20publishing\x20Upwork\x20vs\x20WoW\x20income\x20with\x20auditable\x20addresses\x20after\x20≥20\x20merchants\x20exist.'}],'campaign_paradigm':'\x27$699\x20Arbitration\x20Clinic\x27\x20(M2–M3,\x20only\x20after\x20≥20\x20merchants):\x20publicly\x20resolve\x20sub-$700\x20disputes\x20on-chain,\x20weekly\x20micro-arbitration\x20documentary;\x20KOC\x20transparent-income\x20program\x20with\x20on-chain\x20settlement.','reward_orientation':'Referral\x20and\x20repeat-client\x20rewards;\x20KOC\x20payouts\x20auto-split\x20via\x20Allocation\x20after\x20verified\x20first-order\x20conversion.','discount_orientation':'No\x20fee-discounting\x20narrative\x20—\x20the\x20platform\x20fee\x20is\x20already\x20~0;\x20compete\x20on\x20escrow/arbitration\x20value.'},'conversion_retention':['Convert\x20prospects\x20by\x20showing\x20WIP\x20hashes\x20of\x20similar\x20completed\x20milestones.','Propose\x203–5\x20milestone\x20splits\x20in\x20the\x20first\x20proposal\x20—\x20it\x20signals\x20professionalism\x20and\x20de-risks\x20the\x20client.','Retain\x20via\x20Passport:\x20every\x20clean\x20completion\x20is\x20a\x20portable\x20credential,\x20explicitly\x20say\x20so\x20at\x20delivery.'],'unit_economics':{'formula':'extra\x20per\x20order\x20=\x20legacy\x20fee\x20rate\x20×\x20contract\x20value\x20+\x20avoided\x20connect/arbitration\x20fees\x20−\x20WoW\x20gas','anchors':[{'metric':'AOV\x20anchor\x20(milestone\x20contract)','value':'$1,000'},{'metric':'Legacy\x20take\x20rate','value':'Upwork\x2015.4%\x20≈\x20$154\x20(+\x20client\x203–7.99%)'},{'metric':'Bid\x20entry\x20cost','value':'Connects\x20$48–120\x20first-order;\x20~60%\x20of\x20proposals\x20get\x20no\x20reply'},{'metric':'WoW\x20cost\x20(4–8\x20txns)','value':'gas\x20≈\x20$0.01–0.6;\x20arbitration\x20≈\x20$0.01\x20vs\x20$337.50/party'},{'metric':'Settlement\x20speed','value':'up\x20to\x2027\x20days\x20→\x20seconds\x20on\x20acceptance\x20signature'}],'target_margin_pct_min':0x28,'cost_floor':'Milestone\x20price\x20must\x20cover\x20the\x20quoted\x20hours\x20at\x20the\x20freelancer\x27s\x20minimum\x20hourly\x20rate;\x20no\x20unpaid\x20spec\x20work\x20beyond\x20one\x20proposal.','breakeven_note':'One\x20$1,000\x20contract\x20saves\x20≈$153\x20—\x20adoption\x20pays\x20on\x20the\x20first\x20escrowed\x20job.'},'success_patterns':[{'pattern':'Run\x20the\x20\x27$699\x20Arbitration\x20Clinic\x27\x20with\x20≥10\x20closed\x20micro-arbitrations\x20and\x20publish\x20weekly\x20documentaries.','evidence':'KPI:\x20avg\x20read\x20≥3,000/episode;\x20arbitrator\x20pool\x20≥15.'},{'pattern':'Sign\x205–8\x20mid-tier\x20KOCs\x20with\x20income-guarantee\x20top-ups,\x20settled\x20on-chain\x20after\x20conversion.','evidence':'KPI:\x20≥30\x20registered\x20freelancers\x20per\x20KOC;\x20on-chain\x20conversion\x20≥8%.'},{'pattern':'Standardize\x20the\x2014-day\x20silence\x20auto-acceptance\x20guard\x20on\x20every\x20service.','evidence':'Eliminates\x20the\x20\x27client\x20disappears,\x20funds\x20locked\x27\x20failure\x20mode\x20without\x20weakening\x20buyer\x20protection.'},{'pattern':'Turn\x20down\x20hourly-surveillance\x20clients\x20explicitly.','evidence':'Outcome\x20verification\x20philosophy\x20is\x20the\x20differentiation\x20against\x20Work\x20Diary\x20monitoring.'}],'red_lines':['Do\x20not\x20start\x20work\x20before\x20the\x20milestone\x20is\x20escrowed.','Do\x20not\x20promote\x20reputation\x20portability\x20(Passport)\x20before\x20the\x20issuance\x20UX\x20is\x20production-ready.','Never\x20bid\x20below\x20minimum-rate\x20floor\x20to\x20win\x20volume.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§5','wiki/market/K1/01-行业分析/自由职业-Upwork.md']},{'industry':'travel','benchmark':'Booking\x20/\x20TUI','priority_tier':0x3,'launch_window':'M4+','pricing':{'default_model_id':'multi_segment_release','models':[{'id':'multi_segment_release','name':'Multi-leg\x20itinerary\x20with\x20per-segment\x20release','applicable_when':'Custom/multi-segment\x20packaged\x20trips\x20by\x20small\x20studios\x20(TUI-fit\x2010/10).','upside':'segment_D1..DN\x20machine;\x20each\x20segment\x27s\x20WIP\x20releases\x20its\x20fee;\x20interrupted\x20segments\x20refund\x20in\x20one\x20transaction;\x20fund\x20waterfall\x20fully\x20auditable.','risks':'Sub-providers\x20(hotels/drivers)\x20need\x20not\x20be\x20on-chain\x20initially\x20—\x20the\x20agent\x20is\x20the\x20single\x20on-chain\x20counterparty;\x20adoption\x20bottleneck\x20is\x20why\x20travel\x20is\x20tier\x203.','wowok_levers':['Machine','Allocator','Treasury','Guard','WIP'],'recommended':!![]},{'id':'agent_single_custody','name':'Agent\x20single-counterparty\x20custody','applicable_when':'Downstream\x20suppliers\x20are\x20not\x20on-chain\x20yet.','upside':'Agent↔client\x20escrow\x20closes\x20the\x20trust\x20loop\x20alone;\x20supplier\x20participation\x20grows\x20with\x20network\x20effects.','risks':'Agent\x20must\x20hold\x20correct\x20licensing\x20and\x20fund\x20the\x20compensation\x20coverage.','wowok_levers':['Allocator','Treasury','CompensationFund','Arbitration']},{'id':'weather_guarantee','name':'Weather/condition-guarded\x20pricing','applicable_when':'Weather-sensitive\x20segments\x20can\x20reference\x20an\x20evidence\x20repository.','upside':'Auto-refund\x20triggers\x20via\x20quoted\x20guard\x20+\x20repository\x20oracle\x20—\x20a\x20feature\x20no\x20OTA\x20offers.','risks':'Guard\x20trigger\x20source\x20must\x20be\x20specified\x20and\x20tested\x20before\x20sale.','wowok_levers':['Guard','Allocator','Repository']}]},'postures':{'volume':{'posture':'volume','thesis':'Postpone;\x20volume\x20play\x20only\x20after\x20tier-1/2\x20Passport\x20network\x20lowers\x20cold-start\x20cost.','tradeoffs':'High\x20coordination\x20cost\x20across\x20sub-providers.','guardrails':['Never\x20sell\x20standard\x20standalone\x20flights/hotels\x20(weak\x20WoW\x20value)','Undelivered\x20segments\x20always\x20refundable\x20via\x20the\x20interrupted\x20path']},'balanced':{'posture':'balanced','thesis':'Pilot\x20with\x202–3\x20custom-trip\x20studios\x20on\x20single-counterparty\x20custody;\x20prove\x20the\x20waterfall\x20story.','tradeoffs':'Few\x20pilots,\x20heavy\x20case-building\x20effort\x20($10–15K\x20pilot\x20budget).','guardrails':['Fund\x20waterfall\x20visible\x20to\x20the\x20buyer\x20before\x20payment','Cancellation\x20policy\x20per\x20leg\x20declared\x20up\x20front']},'margin':{'posture':'margin','thesis':'Premium\x20bespoke\x20itineraries\x20priced\x20on\x20trust\x20architecture\x20and\x20transparent\x20waterfall,\x20not\x20OTA\x20discounting.','tradeoffs':'Small\x20high-AOV\x20audience.','guardrails':['Refundable\x20vs\x20non-refundable\x20legs\x20separated\x20explicitly','Never\x20commingle\x20undelivered-segment\x20funds\x20with\x20operating\x20cash']}},'competitor_watch':{'dimensions':['effective\x20commission\x20after\x20Preferred/Genius','waterfall\x20transparency','cancellation\x20terms\x20per\x20leg','downstream\x20refund\x20handling\x20(e.g.\x20EU261\x20gaps)','settlement\x20speed'],'cadence':'monthly','cadence_days':0x1e,'differentiation':['The\x20$2,000\x20waterfall\x20split\x20across\x20hotel/guide/agent\x20is\x20inspectable\x20before\x20purchase','Pre-event\x20isolation\x20vs\x20Thomas-Cook-style\x20post-hoc\x20relief']},'acquisition':{'channels':[{'channel':'Custom-trip\x20studio\x20direct\x20partnerships','priority':0x1,'rationale':'Only\x20segment\x20with\x2010/10\x20fit;\x202–3\x20pilot\x20studios.'},{'channel':'Travel-industry\x20failure\x20news\x20cycles','priority':0x2,'rationale':'Thomas\x20Cook\x20£400M\x20/\x20pandemic\x20$35B\x20refund\x20stories\x20anchor\x20pre-isolation\x20demand.'},{'channel':'Waterfall/weather\x20demo\x20content','priority':0x3,'rationale':'Interactive\x20fund-split\x20and\x20auto-refund\x20demos.'}],'campaign_paradigm':'\x27Transparent\x20waterfall\x27\x20demo\x20($2,000\x20split\x20readable\x20on-chain)\x20+\x20weather-guard\x20auto-refund\x20demo;\x20$10–15K\x20for\x202–3\x20studio\x20pilots,\x20M4–M6.','reward_orientation':'Referral\x20commission\x20for\x20repeat/referral\x20custom\x20trips;\x20flash-sale\x20rewards\x20only\x20for\x20off-peak\x20clearance.','discount_orientation':'Early-bird\x20/\x20group\x20/\x20member\x20pricing\x20within\x20seasons;\x20never\x20discount\x20by\x20hiding\x20non-refundable\x20legs.'},'conversion_retention':['Sell\x20the\x20pre-trip\x20inspection\x20of\x20the\x20entire\x20fund\x20waterfall\x20as\x20the\x20core\x20asset.','Convert\x20with\x20the\x20interrupted-segment\x20one-transaction\x20refund\x20demo.','Re-book\x20via\x20itinerary\x20history\x20and\x20per-leg\x20transparency,\x20not\x20loyalty\x20points.'],'unit_economics':{'formula':'extra\x20per\x20trip\x20=\x20effective\x20OTA\x20commission\x20×\x20trip\x20value\x20−\x20(WoW\x20gas\x20across\x202×segments+3\x20txns)','anchors':[{'metric':'AOV\x20anchor\x20(5-segment\x20custom\x20trip)','value':'$2,000'},{'metric':'Effective\x20legacy\x20commission','value':'25–36%\x20≈\x20$350–720/trip'},{'metric':'WoW\x20cost','value':'gas\x20≈\x20$0.02–1'},{'metric':'Settlement\x20speed','value':'VCC\x202–6\x20weeks\x20→\x20per-segment\x20seconds'}],'target_margin_pct_min':0x23,'cost_floor':'Never\x20collect\x20funds\x20for\x20unbooked\x20legs\x20without\x20the\x20interrupted\x20refund\x20path;\x20compensation\x20coverage\x20sized\x20for\x20max\x20single-segment\x20value.','breakeven_note':'Gas\x20is\x20noise\x20against\x20$350–700\x20saved\x20per\x20trip;\x20the\x20binding\x20constraint\x20is\x20supplier\x20adoption,\x20not\x20economics.'},'success_patterns':[{'pattern':'Pilot\x202–3\x20custom-trip\x20studios\x20with\x20agent-only\x20custody\x20first.','evidence':'Avoids\x20the\x20sub-provider\x20on-chain\x20bottleneck\x20that\x20justifies\x20tier-3\x20timing.'},{'pattern':'Ship\x20the\x20interactive\x20$2,000\x20waterfall\x20visualization\x20as\x20the\x20sales\x20asset.','evidence':'Buys\x20on\x20chain-visible\x20split\x20—\x20unique\x20vs\x20every\x20OTA.'},{'pattern':'Use\x20a\x20weather\x20repository\x20guard\x20for\x20automatic\x20segment\x20refund\x20in\x20one\x20marketed\x20demo.','evidence':'Converts\x20an\x20abstract\x20\x27escrow\x27\x20claim\x20into\x20a\x20visible\x20guarantee.'}],'red_lines':['Do\x20not\x20enter\x20standard\x20flight/hotel\x20resale\x20—\x20WoW\x20value\x20is\x20weak\x20there.','Never\x20market\x20large\x20cross-period\x20custody\x20before\x20stablecoin\x20bridging\x20is\x20ready.','Cross-leg\x20responsibility\x20must\x20be\x20disclosed,\x20not\x20blurred.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§7','wiki/market/K1/01-行业分析/旅游-Booking.md']},{'industry':'retail','benchmark':'Amazon\x20/\x20Etsy','priority_tier':0x3,'launch_window':'M4+','pricing':{'default_model_id':'receipt_confirmed_escrow','models':[{'id':'receipt_confirmed_escrow','name':'Escrow\x20released\x20on\x20confirmed\x20receipt','applicable_when':'Private-traffic\x20sellers\x20(DTC\x20site\x20/\x20community\x20commerce)\x20who\x20already\x20own\x20demand.','upside':'Funds\x20release\x20seconds\x20after\x20receipt\x20guard;\x20return_auth_guard\x20gates\x20fraudulent\x20returns;\x20provenance\x20via\x20repository\x20chain.','risks':'Zero-traffic\x20sellers\x20are\x20a\x20deliberate\x20mismatch\x20—\x20WoW\x20does\x20not\x20replace\x20marketplace\x20demand\x20generation.','wowok_levers':['Allocator','Guard','Repository','Arbitration','CompensationFund'],'recommended':!![]},{'id':'member_bundle_pricing','name':'Member/bundle\x20pricing\x20for\x20private\x20communities','applicable_when':'Community-commerce\x20sellers\x20with\x20repeat\x20purchase\x20cadence.','upside':'Spend-threshold\x20and\x20member\x20pricing\x20via\x20rewards\x20instead\x20of\x20platform\x20TACoS.','risks':'Bundles\x20must\x20still\x20be\x20escrowed\x20per\x20deliverable;\x20no\x20pre-shipment\x20release.','wowok_levers':['Reward','Allocator']}]},'postures':{'volume':{'posture':'volume','thesis':'Turn\x20existing\x20private-traffic\x20flow\x20into\x20escrow\x20GMV;\x20first-order\x20and\x20spend-threshold\x20rewards\x20maximize\x20repeat.','tradeoffs':'Thin\x20unit\x20margin\x20—\x20viable\x20only\x20because\x20gas\x20is\x20<$1\x20per\x20$1,000\x20GMV.','guardrails':['Receipt\x20confirmation\x20guard\x20never\x20bypassed','Compensation\x20fund\x20coverage\x20ratio\x20default\x205×\x20max\x20single\x20order']},'balanced':{'posture':'balanced','thesis':'Pilot\x205–8\x20private-domain\x20sellers;\x20use\x20the\x20gas-bill\x20livestream\x20as\x20the\x20core\x20proof\x20asset.','tradeoffs':'Moderate\x20growth\x20gated\x20by\x20existing\x20audience\x20size.','guardrails':['Return-auth\x20evidence\x20(dual\x20signature\x20/\x20logistics\x20repository)\x20required','Configurable\x20arbitration\x20voting\x20period']},'margin':{'posture':'margin','thesis':'Premium\x20provenance/proven-authenticity\x20selling:\x20repository\x20chain\x20+\x20escrow\x20as\x20anti-counterfeit\x20proof.','tradeoffs':'Niche\x20audience;\x20authenticity\x20verification\x20operations\x20cost.','guardrails':['Never\x20claim\x20authenticity\x20beyond\x20what\x20repository\x20evidence\x20proves','No\x20reserve-period\x20exposure\x20of\x20funds\x20to\x20the\x20seller\x20pre-receipt']}},'competitor_watch':{'dimensions':['headline\x20price','settlement\x20reserve\x20policy','return-fraud\x20handling','arbitration\x20default\x20rulings','provenance\x20evidence'],'cadence':'weekly','cadence_days':0x7,'differentiation':['Settlement\x20in\x20seconds\x20vs\x2014\x20days\x20+\x20DD+90\x20reserve\x20risk','Return\x20fraud\x20requires\x20dual-signed/logistics\x20evidence\x20instead\x20of\x20A-to-z\x20default\x20buyer\x20wins','\x27You\x20pay\x2030%\x20for\x20traffic\x20or\x20trust\x20—\x20we\x20provide\x20trust,\x20you\x20bring\x20traffic\x27']},'acquisition':{'channels':[{'channel':'Existing\x20private-traffic\x20sellers\x20(DTC,\x20community,\x20We-commerce)','priority':0x1,'rationale':'\x27Have\x20traffic,\x20trust\x20is\x20expensive\x27\x20is\x20the\x20filter;\x20zero-traffic\x20sellers\x20are\x20turned\x20away\x20at\x20intake.'},{'channel':'Etsy-refugee\x20targeting','priority':0x2,'rationale':'24.2%\x20fee-increase\x20victim\x20communities.'},{'channel':'Live\x20gas-bill\x20comparison\x20events','priority':0x3,'rationale':'\x27$1,000\x20GMV\x20cost\x20teardown\x27:\x20same\x20shop,\x20WoW\x20vs\x20Amazon\x20$300–350.'}],'campaign_paradigm':'\x27$1,000\x20GMV\x20cost\x27\x20livestream\x20with\x20public\x20full-cycle\x20gas\x20accounting;\x20targeted\x20Etsy-refugee\x20recruitment;\x20$6–10K\x20pilot\x20for\x205–8\x20sellers,\x20M4–M6.','reward_orientation':'First-order\x20discount\x20+\x20spend\x20cashback\x20+\x20spend-threshold\x20rewards\x20inside\x20the\x20owned\x20community.','discount_orientation':'Threshold/limited/member\x20discounts\x20only;\x20no\x20marketplace-style\x20bidding\x20wars.'},'conversion_retention':['Make\x20receipt-confirmation\x20the\x20one-tap\x20trust\x20moment;\x20show\x20release\x20seconds\x20later.','Re-purchase\x20via\x20spend\x20cashback\x20and\x20provenance\x20certificates.','Convert\x20return-averse\x20buyers\x20with\x20the\x20return-auth\x20evidence\x20flow\x20up\x20front.'],'unit_economics':{'formula':'extra\x20per\x20$1,000\x20GMV\x20=\x20legacy\x20combined\x20burden\x20−\x20WoW\x20gas\x20(4–6\x20txns)','anchors':[{'metric':'AOV\x20anchor\x20(private\x20domain)','value':'$50'},{'metric':'Legacy\x20combined\x20burden','value':'Amazon\x2030–35%\x20≈\x20$300–350\x20per\x20$1,000\x20GMV'},{'metric':'WoW\x20cost\x20per\x20$1,000\x20GMV','value':'gas\x20≈\x20$0.01–0.5\x20(<\x20$1)'},{'metric':'Return\x20rate\x20/\x20fraud\x20share','value':'19.3%\x20returns\x20/\x209%\x20fraudulent\x20under\x20incumbent\x20flow'}],'target_margin_pct_min':0x14,'cost_floor':'Never\x20price\x20below\x20COGS\x20+\x20shipping\x20+\x20expected-return-provision;\x20fund\x20coverage\x205×\x20max\x20single\x20order.','breakeven_note':'Economics\x20work\x20at\x20almost\x20any\x20AOV;\x20traffic\x20availability\x20is\x20the\x20only\x20admission\x20criterion.'},'success_patterns':[{'pattern':'Use\x20the\x20honest-boundary\x20intake\x20questionnaire\x20to\x20reject\x20zero-traffic\x20sellers.','evidence':'Raises\x20conversion\x20quality;\x20WoW\x20does\x20not\x20sell\x20traffic\x20(40.5%\x20share\x20value\x20stays\x20with\x20Amazon).\x20'},{'pattern':'Run\x20the\x20public\x20\x27$1,000\x20GMV\x20gas\x20bill\x27\x20livestream\x20with\x20the\x20same\x20shop\x27s\x20orders.','evidence':'Contrasts\x20$300–350\x20incumbent\x20burden\x20vs\x20<$1\x20on-chain\x20cost.'},{'pattern':'Enforce\x20dual-signature/logistics\x20return\x20evidence\x20to\x20structurally\x20raise\x20fraud\x20cost.','evidence':'Targets\x20the\x209%\x20fraudulent\x20share\x20of\x20the\x2019.3%\x20return\x20rate.'},{'pattern':'Recruit\x20Etsy\x20fee-hike\x20refugees\x20directly\x20from\x20victim\x20communities.','evidence':'24.2%\x20unilateral\x20fee\x20increase\x20is\x20the\x20triggering\x20event.'}],'red_lines':['Never\x20promise\x20traffic\x20—\x20WoW\x20is\x20trust\x20infrastructure,\x20not\x20a\x20marketplace\x20demand\x20source.','No\x20auto-default\x20buyer-win\x20rulings;\x20arbitration\x20voting\x20period\x20must\x20be\x20configured.','Physical\x20authenticity\x20claims\x20require\x20repository\x20evidence.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§8','wiki/market/K1/01-行业分析/零售-Amazon.md']},{'industry':'subscription','benchmark':'Patreon\x20/\x20OnlyFans\x20/\x20Apple\x20IAP','priority_tier':0x2,'launch_window':'M2–M4','pricing':{'default_model_id':'per_period_signed_charge','models':[{'id':'per_period_signed_charge','name':'Per-period\x20signed\x20charge\x20with\x20delivery\x20gate','applicable_when':'Creator\x20memberships,\x20newsletters,\x20indie\x20software\x20—\x20recurring\x20digital\x20value.','upside':'charge_guard_signer\x20requires\x20explicit\x20signature\x20every\x20period;\x20deliver_guard_wip\x20blocks\x20the\x20charge\x20when\x20no\x20value\x20was\x20delivered;\x20cancel\x20is\x20one\x20signature;\x20100%\x20Allocation\x20to\x20creator.','risks':'The\x20per-period\x20signature\x20is\x20deliberate\x20friction\x20—\x20sell\x20it\x20as\x20the\x20feature;\x20do\x20not\x20sneak\x20in\x20any\x20auto-renewal\x20path.','wowok_levers':['Guard','Allocator','Machine','Reward'],'recommended':!![]},{'id':'annual_prepaid_period_release','name':'Annual\x20prepay\x20released\x20per\x20period','applicable_when':'Loyal\x20fans\x20wanting\x20a\x20yearly\x20plan;\x20creator\x20wants\x20upfront\x20cash.','upside':'Annual\x20funds\x20escrow\x20and\x20release\x20monthly\x20to\x20the\x20creator\x20—\x20prepaid\x20but\x20protected\x20if\x20the\x20creator\x20stops.','risks':'Stoppage\x20refunds\x20for\x20undelivered\x20months\x20must\x20be\x20structurally\x20guaranteed.','wowok_levers':['Allocator','Guard']},{'id':'tiered_membership','name':'Tiered\x20membership\x20with\x20escalating\x20deliverables','applicable_when':'Creators\x20with\x20multiple\x20value\x20tiers\x20(Patreon-style).','upside':'Each\x20tier\x20maps\x20to\x20its\x20own\x20delivery\x20guard;\x20upgrades/downgrades\x20take\x20effect\x20next\x20period\x20only.','risks':'Tier\x20deliverables\x20must\x20be\x20concrete\x20enough\x20for\x20the\x20delivery\x20guard\x20to\x20evaluate.','wowok_levers':['Machine','Guard','WIP']}]},'postures':{'volume':{'posture':'volume','thesis':'Subscriber\x20count\x20first\x20via\x20the\x20\x27signing\x20movement\x27\x20consumer\x20tool\x20and\x20first-month\x20pricing;\x20keep\x20100%\x20pass-through\x20as\x20the\x20wedge.','tradeoffs':'Conversion\x20funnel\x20includes\x20the\x20signature\x20friction\x20—\x20lean\x20into\x20it\x20as\x20qualification.','guardrails':['Never\x20reintroduce\x20auto-renewal\x20to\x20optimize\x20conversion','Delivery\x20gate\x20on\x20every\x20charge']},'balanced':{'posture':'balanced','thesis':'Balance\x20acquisition\x20(subscription\x20checkup\x20tool)\x20with\x20retention\x20(100%\x20arrival\x20day\x20rituals).','tradeoffs':'Moderate\x20growth;\x20investment\x20in\x20per-period\x20value\x20proof.','guardrails':['Fee\x20schedule\x20frozen\x20at\x20publish','Cancellation\x20one\x20signature,\x20no\x20retention\x20dark\x20patterns']},'margin':{'posture':'margin','thesis':'Fewer,\x20higher-paying\x20true\x20fans;\x20per-period\x20signing\x20filters\x20for\x20committed\x20members\x20and\x20supports\x20premium\x20tiers.','tradeoffs':'Smaller\x20list,\x20higher\x20ARPU.','guardrails':['No\x20IAP-style\x2030%\x20channel\x20accepted\x20—\x20direct\x20settlement\x20is\x20the\x20product','Stoppage\x20protection\x20advertised\x20and\x20enforced']}},'competitor_watch':{'dimensions':['take\x20rate\x20and\x20unilateral\x20change\x20history','charge\x20transparency','cancellation\x20click\x20count','stopped-creator\x20policy','time-to-payout'],'cadence':'weekly','cadence_days':0x7,'differentiation':['13\x20years\x20/\x20three\x20unilateral\x20Patreon\x20price\x20rises\x20are\x20structurally\x20impossible\x20(published\x20allocation\x20is\x20frozen)','Charge\x20without\x20delivery\x20cannot\x20pass\x20—\x20an\x20industry\x20blank','15-option\x20cancel\x20maze\x20→\x20one\x20signature\x20(FTC\x20$2.5B\x20settlement\x20context)']},'acquisition':{'channels':[{'channel':'Creator\x20communities\x20(Discord,\x20Patreon\x20forums)','priority':0x1,'rationale':'Survival-line\x20creators\x20($131–180\x20median\x20monthly)\x20feel\x20the\x2010–20%\x20fee\x20directly\x20($2–5\x20per\x20subscriber).'},{'channel':'Newsletter\x20/\x20indie-dev\x20circles','priority':0x2,'rationale':'Apple\x20IAP\x2030%\x20+\x2075-day\x20payout\x20float\x20pain.'},{'channel':'Hacker\x20News\x20/\x20anti-dark-pattern\x20audience','priority':0x3,'rationale':'Values\x20alignment\x20beats\x20ad\x20spend.'}],'campaign_paradigm':'\x27Signing\x20Movement\x27\x20(M2–M4):\x20consumer-side\x20subscription\x20checkup\x20widget\x20(2.5×\x20spend\x20underestimate\x20/\x2042%\x20unused\x20data)\x20+\x20creator\x20\x27100%\x20arrival\x20day\x27\x20monthly\x20chain-receipt\x20posts;\x20$4–7K,\x20keyed\x20to\x20FTC/price-hike\x20news\x20cycles.','reward_orientation':'Loyalty\x20+\x20referral\x20rewards\x20only;\x20first-month\x20price\x20as\x20the\x20single\x20acquisition\x20discount.','discount_orientation':'Annual\x20/\x20team\x20/\x20upgrade\x20discounts\x20—\x20never\x20discount\x20by\x20hiding\x20renewal\x20terms.'},'conversion_retention':['Onboard\x20creators\x20by\x20migrating\x20one\x20tier\x20first\x20and\x20showing\x20the\x20per-period\x20release\x20receipts.','Retain\x20with\x20the\x20\x27unused\x20month\x27\x20guarantee:\x20no\x20delivery\x20→\x20no\x20charge.','Convert\x20fans\x20with\x20the\x20cancellation\x20demo\x20(15\x20options\x20→\x201\x20signature).'],'unit_economics':{'formula':'extra\x20per\x20year\x20=\x20legacy\x20take\x20rate\x20×\x20annual\x20subscription\x20revenue\x20−\x20WoW\x20gas\x20(2\x20txns/period)','anchors':[{'metric':'Monthly\x20anchor','value':'$100/month\x20($1,200/year)'},{'metric':'Legacy\x20take','value':'Patreon\x2010%\x20≈\x20$10/month;\x20iOS\x20IAP\x2030%'},{'metric':'WoW\x20annual\x20cost\x20(12\x20periods)','value':'gas\x20≈\x20$0.03–2/year'},{'metric':'Payout\x20speed','value':'IAP\x20up\x20to\x2075-day\x20float\x20→\x20seconds\x20each\x20period'}],'target_margin_pct_min':0x3c,'cost_floor':'Creator\x20must\x20keep\x20delivering\x20per-period\x20value;\x20no\x20charge\x20passes\x20without\x20delivery\x20evidence.','breakeven_note':'≈$120/year\x20extra\x20on\x20a\x20single\x20$100/month\x20membership.'},'success_patterns':[{'pattern':'Ship\x20the\x20subscription-checkup\x20widget\x20before\x20creator\x20outreach.','evidence':'KPI:\x20≥20,000\x20checkups;\x20consumer\x20demand\x20pulls\x20creators.'},{'pattern':'Run\x20monthly\x20\x27100%\x20arrival\x20day\x27\x20with\x20public\x20chain\x20receipts.','evidence':'30\x20creators\x20onboard\x20target;\x20turns\x20payout\x20into\x20recurring\x20proof.'},{'pattern':'Publish\x20the\x20one-signature\x20cancellation\x20video.','evidence':'KPI:\x20≥100K\x20views\x20—\x20contrast\x20with\x20the\x204-page/6-click/15-option\x20incumbent\x20flow.'},{'pattern':'Capture\x20education\x20recorded-course\x20overflow\x20traffic.','evidence':'Routing\x20rule:\x20recorded\x20courses\x20→\x20subscription,\x20keeping\x20both\x20fits\x20clean.'}],'red_lines':['Never\x20implement\x20or\x20imply\x20auto-renewal\x20—\x20every\x20period\x20is\x20signed.','Never\x20charge\x20a\x20period\x20without\x20delivery\x20evidence.','No\x20rate\x20lock\x20claims\x20except\x20through\x20published\x20frozen\x20Allocation.'],'sources':['wiki/market/K1/05-商业化/02-六行业商业模式深度论证与落地执行手册.md\x20§6','wiki/market/K1/01-行业分析/订阅-Patreon.md']}];const STRATEGY_BY_INDUSTRY=new Map(INDUSTRY_STRATEGIES['map'](a=>[a['industry'],a]));export function registerIndustryStrategy(a){STRATEGY_BY_INDUSTRY['set'](a['industry'],a);}export function unregisterIndustryStrategy(a){const b=INDUSTRY_STRATEGIES['find'](c=>c['industry']===a);if(b)return STRATEGY_BY_INDUSTRY['set'](a,b),!![];return STRATEGY_BY_INDUSTRY['delete'](a);}export function getIndustryStrategy(a){return STRATEGY_BY_INDUSTRY['get'](a['toLowerCase']());}export function listIndustryStrategies(){return SUPPORTED_INDUSTRIES['map'](a=>STRATEGY_BY_INDUSTRY['get'](a))['filter'](a=>a!==undefined);}export function stageFromOrderCount(a){if(a>=0x32)return'optimization';if(a>=0x14)return'mature';if(a>=0x5)return'growing';return'cold_start';}export function recommendStrategy(a,b='balanced',c,d){const e=getIndustryStrategy(a);if(!e||e['pricing']['models']['length']===0x0)return null;const f=c??(d?.['order_count']!==undefined?stageFromOrderCount(d['order_count']):'cold_start');let g=e['pricing']['models']['find'](j=>j['id']===e['pricing']['default_model_id'])??e['pricing']['models'][0x0];if(b==='volume'){const j=e['pricing']['models']['find'](k=>/(?:^|_)(discount|trial|first|bundle|member)(?:_|$)/i['test'](k['id']))??g;g=j;}else{if(b==='margin'&&e['pricing']['models']['length']>0x1){const k=e['pricing']['models']['find'](l=>/premium|graded|tiered|guarantee|prepaid/i['test'](l['id']));if(k)g=k;}}const h=[],i=(l,m)=>{if(l&&h['length']<0x3)h['push'](m);};return i(f==='cold_start','Cold\x20start:\x20publish\x20the\x20service\x20with\x20the\x20\x22'+g['name']+'\x22\x20model\x20and\x20bound\x20Arbitration\x20+\x20compensation\x20fund\x20first;\x20seed\x20the\x20anchor\x20trust\x20case\x20before\x20discounting.'),d?.['dispute_rate']!==undefined&&i(d['dispute_rate']>0.05,'Dispute\x20rate\x20'+(d['dispute_rate']*0x64)['toFixed'](0x1)+'%\x20exceeds\x205%:\x20tighten\x20pre-delivery\x20evidence\x20guards\x20and\x20pause\x20promotions\x20until\x20closure\x20is\x20back\x20on-chain.'),d?.['repeat_customer_rate']!==undefined&&i(d['repeat_customer_rate']<0.25&&f!=='cold_start','Repeat\x20rate\x20'+(d['repeat_customer_rate']*0x64)['toFixed'](0x0)+'%\x20is\x20below\x20the\x2025%\x20K1\x20gate:\x20add\x20a\x20repeat/referral\x20reward\x20and\x20review\x20post-delivery\x20follow-up\x20rather\x20than\x20cutting\x20price.'),d?.['order_count']!==undefined&&i(b==='volume'&&d['order_count']>=0x5&&d['order_count']<0x32,'Growing\x20stage\x20under\x20volume\x20posture:\x20run\x20the\x20cataloged\x20acquisition\x20campaign\x20('+(e['acquisition']['channels'][0x0]?.['channel']??'top\x20channel')+')\x20with\x20reward—not\x20blanket\x20discount—orientation.'),i(h['length']===0x0,b+'\x20posture:\x20hold\x20the\x20\x22'+g['name']+'\x22\x20model,\x20run\x20the\x20'+e['competitor_watch']['cadence']+'\x20competitor\x20watch\x20('+e['competitor_watch']['dimensions']['slice'](0x0,0x3)['join'](',\x20')+'),\x20and\x20keep\x20all\x20guardrails:\x20'+e['postures'][b]['guardrails'][0x0]),{'industry':e['industry'],'posture':b,'stage':f,'pricing_model_id':g['id'],'pricing_model_name':g['name'],'actions':h['slice'](0x0,0x3)};}export function validateStrategyLevers(a){const b=[];for(const c of a['pricing']['models']){for(const d of c['wowok_levers']){!LEVER_WHITELIST['has'](d)&&b['push'](a['industry']+'.'+c['id']+':\x20unknown\x20WoW\x20lever\x20\x27'+d+'\x27');}}return b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{query_events}from'@wowok/wowok';import{batchQueryObjectsByIds as
|
|
1
|
+
import{query_events}from'@wowok/wowok';import{batchQueryObjectsByIds as a145a}from'../graph/onchain/sdk-batch.js';function toStr(a){if(typeof a==='string')return a;if(typeof a==='number'||typeof a==='bigint')return String(a);return undefined;}async function collectObjectIdsByEvent(a,b,c,d,e){const f=new Set();let g=null,h=![];while(f['size']<d){const i=await query_events({'type':a,'cursor':g,'limit':0x32,'order':'descending','no_cache':e,'network':c}),j=i?.['data']??[];if(j['length']===0x0)break;for(const k of j){const l=b(k);if(l)f['add'](l);}h=!!(i?.['hasNextPage']&&i?.['nextCursor']);if(!h)break;g=i?.['nextCursor']??null;}return{'ids':Array['from'](f)['slice'](0x0,d),'hasMore':h};}export async function enumerateServices(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('ServiceEvent',i=>typeof i?.['object']==='string'?i['object']:undefined,a,c,b['no_cache']),f=await a145a(d,a,b['no_cache']),g=(b['location_any']??[])['map'](i=>i['toLowerCase']()),h=f['filter'](i=>(i?.['type']??'')==='Service')['filter'](i=>{if(g['length']===0x0)return!![];const j=typeof i?.['location']==='string'?i['location']['toLowerCase']():'';return g['some'](k=>j['includes'](k));})['map'](i=>({'object':String(i['object']),'name':typeof i['name']==='string'?i['name']:undefined,'location':typeof i['location']==='string'?i['location']:'','json':{...i,'compensation_fund':toStr(i['compensation_fund']),'sales':Array['isArray'](i['sales'])?i['sales']['map'](j=>({...j,'price':toStr(j['price'])})):[]}}));return{'services':h,'total_enumerated':h['length'],'has_more':e};}export async function enumerateDemands(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('DemandChangedEvent',h=>typeof h?.['object']==='string'?h['object']:undefined,a,c,b['no_cache']),f=await a145a(d,a,b['no_cache']),g=f['filter'](h=>(h?.['type']??'')==='Demand')['map'](h=>h);return{'demands':g,'total_enumerated':g['length'],'has_more':e};}export async function enumerateArbs(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('ArbEvent',i=>typeof i?.['arb']==='string'?i['arb']:undefined,a,c,b['no_cache']),f=await a145a(d,a,b['no_cache']),g=b['status']===undefined?undefined:Array['isArray'](b['status'])?b['status']:[b['status']],h=f['filter'](i=>(i?.['type']??'')==='Arb')['map'](i=>i)['filter'](i=>b['arbitration']?i['arbitration']===b['arbitration']:!![])['filter'](i=>b['order']?i['order']===b['order']:!![])['filter'](i=>g?g['includes'](Number(i['status'])):!![]);return{'arbs':h,'total_enumerated':h['length'],'has_more':e};}
|
|
@@ -33,6 +33,7 @@ export interface RecipientFinding {
|
|
|
33
33
|
evidence_paths: string[];
|
|
34
34
|
mitigation: string;
|
|
35
35
|
unavoidable: boolean;
|
|
36
|
+
resolution_required?: boolean;
|
|
36
37
|
}
|
|
37
38
|
export type Stakeholder = "provider" | "customer" | "caller" | "system";
|
|
38
39
|
export type PayoffPosition = "gains" | "loses" | "neutral" | "conditional";
|
|
@@ -57,6 +58,8 @@ export interface AllocatorModel {
|
|
|
57
58
|
export interface GuardDef {
|
|
58
59
|
table?: GuardTableItemLike[];
|
|
59
60
|
root: unknown;
|
|
61
|
+
relies?: string[];
|
|
62
|
+
relies_logic_and?: boolean;
|
|
60
63
|
}
|
|
61
64
|
interface GuardTableItemLike {
|
|
62
65
|
identifier: number;
|
|
@@ -119,11 +122,12 @@ export interface RecipientConstraintAudit {
|
|
|
119
122
|
detail: string;
|
|
120
123
|
}>;
|
|
121
124
|
safe_destination: boolean;
|
|
125
|
+
resolution_required: boolean;
|
|
122
126
|
overall: FindingSeverity;
|
|
123
127
|
summary: string;
|
|
124
128
|
}
|
|
125
129
|
export declare function classifyRecipient(who: unknown): RecipientSpec | null;
|
|
126
|
-
export declare const RECIPIENT_CONSTRAINT_VERSION = "1.
|
|
130
|
+
export declare const RECIPIENT_CONSTRAINT_VERSION = "1.2.0";
|
|
127
131
|
export declare function analyzeRecipientConstraints(input: RecipientConstraintInput): RecipientConstraintAudit;
|
|
128
132
|
export declare function derivePayoffFromSharing(sharing: Array<{
|
|
129
133
|
who: unknown;
|
|
@@ -136,6 +140,7 @@ export declare function canonicalDoctrine(code: "RC-FIND-01" | "RC-FIND-03" | "R
|
|
|
136
140
|
severity: FindingSeverity;
|
|
137
141
|
title: string;
|
|
138
142
|
mitigation: string;
|
|
143
|
+
resolution_required?: boolean;
|
|
139
144
|
};
|
|
140
145
|
export interface RecipientDesignOption {
|
|
141
146
|
id: "entity" | "submitted_object" | "signer" | "constrained_submission";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ValueType}from'@wowok/wowok';import{getGuardQueryByIdOrName}from'../schema/utils/guard-query-utils.js';function asNode(a){if(typeof a!=='object'||a===null)return null;const b=a['type'];return typeof b==='string'?a:null;}function queryMeta(a){if(typeof a!=='number'&&typeof a!=='string')return null;const b=getGuardQueryByIdOrName(a);return b?{'id':b['id'],'name':b['name']}:null;}function childNodes(a){const b=[];if(Array['isArray'](a['nodes']))a['nodes']['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);});if(asNode(a['node']))b['push'](asNode(a['node']));return[a['nodeLeft'],a['nodeRight']]['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);}),b;}export function classifyRecipient(a){if(typeof a!=='object'||a===null)return null;const b=a;if(typeof b['Entity']==='string')return{'kind':'entity','address':b['Entity']};const c=b['Entity'];if(c&&typeof c==='object'&&typeof c['name_or_address']==='string')return{'kind':'entity','address':c['name_or_address']};if(b['Signer']==='signer'||b['Signer']===!![])return{'kind':'signer'};if(typeof b['GuardIdentifier']==='number')return{'kind':'submission','identifier':b['GuardIdentifier']};return null;}function leafInfo(a,b){if(a['type']==='context'&&typeof a['context']==='string'){if(a['context']==='Signer')return{'kind':'signer'};if(a['context']==='Clock')return{'kind':'clock'};}if(a['type']==='query'){const c=queryMeta(a['query']),d=a['object'];if(c&&d&&typeof d['identifier']==='number')return{'kind':'query','query_name':c['name'],'query_id':c['id'],'object_identifier':d['identifier'],'convert_witness':d['convert_witness']};}if(a['type']==='identifier'){const e=typeof a['identifier']==='number'?a['identifier']:-0x1,f=b['find'](g=>g['identifier']===e);if(f){const g=typeof f['value']==='string'?f['value']:undefined;if(f['value_type']===ValueType['Address'])return{'kind':'static_address','value':g};if(f['value_type']===ValueType['String'])return{'kind':'static_string','value':g};}}return{'kind':'other'};}function comparisonLeaves(a,b){if(a['type']==='logic_equal'){const c=childNodes(a)['map'](d=>flattenLeaf(d,b));return c;}return[];}function flattenLeaf(a,b){if(a['type']==='logic_not'){const d=childNodes(a)[0x0];return d?flattenLeaf(d,b):{'kind':'other'};}return leafInfo(a,b);}function isOrderProgressWitness(a){if(a===0x64)return!![];return typeof a==='string'&&a['toLowerCase']()['includes']('orderprogress');}function describe(a){switch(a){case'service_binding':return'Submitted\x20object\x20must\x20belong\x20to\x20the\x20expected\x20service';case'progress_node_state':return'Submitted\x20order\x20must\x20be\x20at\x20a\x20qualifying\x20workflow\x20node';case'signer_is_submitted_object_owner':return'Caller\x20must\x20be\x20the\x20owner\x20of\x20the\x20submitted\x20object';case'signer_authorized_entity':return'Caller\x20must\x20equal\x20a\x20fixed\x20authorized\x20address';case'signer_permission_member':return'Caller\x20must\x20satisfy\x20a\x20Permission\x20membership\x20rule';case'time_lock':return'Current\x20time\x20must\x20satisfy\x20the\x20time-lock';case'repository_crosscheck':return'Repository\x20data\x20must\x20satisfy\x20the\x20cross-check';default:return'Other\x20guard\x20constraint';}}function extractConstraints(a,b){const c=[],d=new Set(),e=h=>{const i=h['code']+':'+(h['slot']??'-');!d['has'](i)&&(d['add'](i),c['push'](h));},f=(h,i)=>({'path':h,'queries':i}),g=(h,i)=>{const j=comparisonLeaves(h,b);if(j['length']>=0x2){const k=j['find'](r=>r['kind']==='signer'),l=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.owner'),m=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.service'),n=j['find'](r=>r['kind']==='query'&&r['query_name']==='progress.current'),o=j['find'](r=>r['kind']==='static_address'),p=j['find'](r=>r['kind']==='static_string');k&&l&&e({'code':'signer_is_submitted_object_owner','slot':l['object_identifier'],'description':describe('signer_is_submitted_object_owner'),'caller_constraint':!![],'evidence':f(i,['Signer','order.owner'])});k&&o&&e({'code':'signer_authorized_entity','description':describe('signer_authorized_entity'),'caller_constraint':!![],'evidence':f(i,['Signer'])});m&&o&&e({'code':'service_binding','slot':m['object_identifier'],'description':describe('service_binding'),'caller_constraint':![],'evidence':f(i,['order.service'])});if(n&&p){const r=n['object_identifier'];isOrderProgressWitness(n['convert_witness'])&&e({'code':'progress_node_state','slot':r,'description':describe('progress_node_state'),'caller_constraint':![],'evidence':f(i,['progress.current'])});}}if(h['type']['startsWith']('logic_as_u256')||h['type']==='calc_number_add'){const s=[h,...childNodes(h)]['map'](t=>flattenLeaf(t,b));if(s['some'](t=>t['kind']==='clock')&&s['some'](t=>t['kind']==='query'&&(t['query_name']==='progress.current_time'||t['query_name']==='progress.session.forward.time'))){const t=s['find'](u=>u['kind']==='query');e({'code':'time_lock','slot':t['object_identifier'],'description':describe('time_lock'),'caller_constraint':![],'evidence':f(i,['Clock',t['query_name']])});}}if(h['type']==='query'){const u=queryMeta(h['query']);if(u&&u['name']['startsWith']('repository.')){const v=h['object'];e({'code':'repository_crosscheck','slot':v?.['identifier'],'description':describe('repository_crosscheck'),'caller_constraint':![],'evidence':f(i,[u['name']])});}}childNodes(h)['forEach']((w,x)=>g(w,i+'/'+x));};return g(a,'/root'),c;}function findSessionQueries(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']);if(f&&(f['id']===0x4f6||f['id']===0x4f7))b['push'](e);}childNodes(d)['forEach']((g,h)=>c(g,e+'/'+h));};return c(a,'/root'),b;}function collectSlotUsages(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']),g=d['object'];f&&g&&typeof g['identifier']==='number'&&b['push']({'slot':g['identifier'],'path':e,'query_id':f['id'],'query_name':f['name'],...g['convert_witness']!==undefined?{'convert_witness':g['convert_witness']}:{}});}childNodes(d)['forEach']((h,j)=>c(h,e+'/'+j));};return c(a,'/root'),b;}function deriveReceiptRight(a,b){const c=b['find'](e=>e['code']==='progress_node_state'&&e['slot']===a),d=b['find'](e=>e['code']==='signer_is_submitted_object_owner'&&e['slot']===a);if(c||d)return{'object_type':'order','receive_entry':'order::owner_receive','guarantee':'Delivered\x20funds\x20are\x20owned\x20by\x20the\x20submitted\x20Order;\x20only\x20its\x20current\x20owner\x20can\x20'+'extract\x20them\x20(&mut\x20Order\x20input),\x20and\x20coins\x20transfer\x20to\x20that\x20owner.'};return undefined;}function deriveBeneficialOwner(a,b){switch(a['kind']){case'entity':return'Fixed\x20entity\x20'+a['address'];case'signer':return'Transaction\x20caller\x20(Signer)\x20—\x20direct\x20wallet';case'submission':return b?'Owner\x20of\x20the\x20submitted\x20object\x20at\x20table['+a['identifier']+']\x20(object\x20receipt\x20=\x20owner\x20receipt)':'Address\x20submitted\x20at\x20table['+a['identifier']+']\x20(caller-provided)';}}function buildSlotModels(a,b,c,d){const e=[...new Set(c['map'](f=>f['spec'])['filter'](f=>f['kind']==='submission')['map'](f=>f['identifier']))];return e['map'](f=>{const g=a['find'](p=>p['identifier']===f),h=g?normalizeValueType(g['value_type']):undefined,i=h===ValueType['Address'],j=b['filter'](p=>p['slot']===f),k=c['filter'](p=>p['spec']['kind']==='submission'&&p['spec']['identifier']===f)['map'](p=>p['mode']??'Unknown'),l=d['filter'](p=>p['slot']===undefined||p['slot']===f),m=deriveReceiptRight(f,d),n=l['some'](p=>p['code']==='service_binding'||p['code']==='repository_crosscheck'||p['code']==='signer_permission_member'),o=[];if(h!==undefined&&!i)o['push']('RC-FIND-07');if(!n)o['push']('RC-FIND-02');if(m?.['object_type']==='order')o['push']('RC-FIND-03');return{'identifier':f,'externally_submitted':g?.['b_submission']??!![],...h!==undefined?{'declared_value_type':h}:{},'is_address':i,'usages':j,'recipient_modes':k,'constraints':l,...m?{'receipt':m}:{},'beneficial_owner':deriveBeneficialOwner({'kind':'submission','identifier':f},m),'assessment':{'address_typed':i,'scope_bound':n,'object_receipt':m?.['object_type']==='order'},'findings':o};});}function buildSlotFinding(a,b,c){const d=a['identifier'];switch(b){case'RC-FIND-07':return{'code':b,'severity':'MEDIUM','title':'Submission\x20slot\x20'+d+'\x20is\x20not\x20address-typed','explanation':'GuardIdentifier\x20recipients\x20require\x20an\x20address-typed\x20table\x20entry\x20'+'(enforced\x20by\x20allocator_add\x20/\x20ERECIPIENT_IDENTIFIER_NOT_ADDRESS).','evidence_paths':c,'mitigation':'Set\x20the\x20slot\x20value_type\x20to\x20Address,\x20or\x20use\x20an\x20Entity\x20recipient.','unavoidable':![]};case'RC-FIND-02':return{'code':b,'severity':'HIGH','title':'Submission\x20slot\x20'+d+'\x20has\x20no\x20scope\x20binding','explanation':'Nothing\x20constrains\x20which\x20submitted\x20objects/addresses\x20qualify:\x20no\x20'+'service\x20binding,\x20repository\x20cross-check\x20or\x20permission\x20membership.\x20A\x20caller\x20'+'can\x20submit\x20arbitrary\x20qualifying-by-other-conditions\x20inputs.','evidence_paths':c,'mitigation':'Add\x20a\x20constraint\x20binding\x20the\x20slot\x20(e.g.\x20order.service\x20==\x20host\x20service).','unavoidable':![]};case'RC-FIND-03':return{'code':b,'severity':'MEDIUM','title':'Cross-allocation\x20settlement\x20residual','explanation':'The\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20Allocation\x20being\x20settled\x20'+'(alloc\x20is\x20permissionless\x20and\x20allocation\x20context\x20is\x20not\x20a\x20Guard\x20input).\x20A\x20'+'caller\x20owning\x20ANY\x20qualifying\x20order\x20can\x20settle\x20OTHER\x20allocations;\x20funds\x20land\x20'+'at\x20the\x20submitted\x20order\x20and\x20are\x20receivable\x20by\x20its\x20owner.\x20Destination\x20is\x20safe\x20'+'(an\x20order\x20owner),\x20allocation\x20choice\x20is\x20the\x20residual.','evidence_paths':c,'mitigation':'Accept\x20with\x20monitoring,\x20or\x20use\x20a\x20fixed\x20Entity\x20recipient\x20when\x20the\x20destination\x20is\x20known\x20ahead\x20of\x20time.','unavoidable':!![]};default:return{'code':b,'severity':'LOW','title':'Slot\x20'+d+'\x20finding\x20'+b,'explanation':'','evidence_paths':c,'mitigation':'','unavoidable':![]};}}function buildFindings(a,b){const c=[];let d=![],e=![];for(const f of b){const g=f['recipients']['flatMap'](h=>h['constraints'])['filter'](h=>h['caller_constraint']);if(g['length']>0x0)d=!![];if(f['slots']['some'](h=>h['assessment']['scope_bound']))e=!![];for(const h of f['recipients']){const i=h['constraints']['map'](j=>j['evidence']['path']);h['spec']['kind']==='signer'&&g['length']===0x0&&c['push']({'code':'RC-FIND-01','severity':'CRITICAL','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','explanation':'Funds\x20are\x20delivered\x20directly\x20to\x20the\x20transaction\x20caller,\x20but\x20the\x20Guard\x20'+'does\x20not\x20bind\x20the\x20Signer\x20to\x20an\x20authorized\x20identity.\x20Anyone\x20who\x20satisfies\x20the\x20'+'other\x20conditions\x20steals\x20the\x20funds.','evidence_paths':i,'mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.','unavoidable':![]});}for(const j of f['slots']){const k=j['constraints']['map'](l=>l['evidence']['path']);for(const l of j['findings']){c['push'](buildSlotFinding(j,l,k));}}}a['trigger_source']==='standalone'&&!d&&c['push']({'code':'RC-FIND-04','severity':'HIGH','title':'Standalone\x20allocation\x20without\x20issuer\x20identity\x20constraint','explanation':'Standalone\x20allocations\x20have\x20no\x20Service/Arbitration\x20access-control\x20layer.\x20'+'Without\x20a\x20Signer/permission\x20binding\x20in\x20the\x20Guard,\x20anyone\x20can\x20trigger\x20distribution.','evidence_paths':[],'mitigation':'Bind\x20the\x20issuer\x20(Signer==owner/admin)\x20or\x20move\x20the\x20allocation\x20into\x20a\x20Service.','unavoidable':![]});c['push']({'code':'RC-FIND-06','severity':'LOW','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','explanation':'Once\x20the\x20Guard\x27s\x20conditions\x20are\x20satisfiable,\x20anyone\x20can\x20trigger\x20settlement\x20of\x20an\x20'+'order\x27s\x20allocation.\x20With\x20Entity/object\x20recipients\x20this\x20affects\x20timing\x20only,\x20not\x20destination.','evidence_paths':[],'mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.','unavoidable':!![]});for(const [m,n]of Object['entries'](a['guards']??{})){const o=asNode(n['root']);if(!o)continue;for(const q of findSessionQueries(o)){c['push']({'code':'RC-FIND-05','severity':'MEDIUM','title':'Guard\x20'+m+'\x20uses\x20session-only\x20query\x20at\x20'+q,'explanation':'Queries\x201270/1271\x20read\x20the\x20active\x20session;\x20after\x20the\x20session\x20migrates\x20to\x20'+'history\x20the\x20query\x20aborts\x20(W_FIELD_NOT_FOUND)\x20and\x20the\x20Guard\x20permanently\x20fails.','evidence_paths':[q],'mitigation':'Use\x20progress.current_time\x20(1272)\x20or\x20history\x20queries\x20(1274-1279).','unavoidable':![]});}}if(!e&&a['trigger_source']==='service_order_allocators'){}return c;}function buildPayoff(a,b){const c=a['recipients']['some'](h=>h['constraints']['some'](i=>i['caller_constraint'])),d=c?'Caller\x20must\x20satisfy\x20the\x20Guard\x27s\x20Signer/identity\x20binding':b==='standalone'?'Any\x20caller\x20(no\x20identity\x20binding)':'Any\x20caller\x20who\x20satisfies\x20the\x20Guard\x27s\x20object/state\x20conditions',e=a['recipients']['map'](h=>h['beneficial_owner'])['join'](';\x20')||'(none)',f={},g=a['recipients']['some'](h=>h['spec']['kind']==='signer'&&!c);return f['caller']=g?'gains':c?'conditional':'neutral',f['provider']=a['recipients']['some'](h=>h['spec']['kind']==='entity')?'gains':'conditional',f['customer']=a['recipients']['some'](h=>h['receipt']?.['object_type']==='order')?'conditional':'neutral',f['system']='neutral',{'caller_eligibility':d,'beneficial_recipient':e,'positions':f};}export const RECIPIENT_CONSTRAINT_VERSION='1.1.0';export function analyzeRecipientConstraints(a){const b=a['allocators']['map'](g=>{const h=a['guards']?.[g['guard']],i=asNode(h?.['root']),j=h?.['table']??[],k=i?extractConstraints(i,j):[],l=i?collectSlotUsages(i):[],m=g['sharing']['map'](p=>{const q=classifyRecipient(p['who']);if(!q)return{'spec':{'kind':'entity','address':'(unclassifiable)'},'constraints':k,'beneficial_owner':'Unclassifiable\x20recipient\x20—\x20check\x20allocator\x20config'};const r=q['kind']==='submission'?q['identifier']:undefined,t=r!==undefined?j['find'](v=>v['identifier']===r):undefined,u=r!==undefined?deriveReceiptRight(r,k):undefined;return{'spec':q,'slot_value_type':t?normalizeValueType(t['value_type']):undefined,'constraints':r!==undefined?k['filter'](v=>v['slot']===undefined||v['slot']===r):k,'receipt':u,'beneficial_owner':deriveBeneficialOwner(q,u)};}),n=buildSlotModels(j,l,g['sharing']['map'](p=>({'spec':classifyRecipient(p['who'])??{'kind':'entity','address':'(unclassifiable)'},'mode':p['mode']})),k),o={'guard':g['guard'],'recipients':m,'slots':n,'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return o['payoff']=buildPayoff(o,a['trigger_source']),o;}),c=buildFindings(a,b),d=c['some'](g=>g['severity']==='CRITICAL')?'CRITICAL':c['some'](g=>g['severity']==='HIGH')?'HIGH':c['some'](g=>g['severity']==='MEDIUM')?'MEDIUM':'LOW',e=!c['some'](g=>g['code']==='RC-FIND-01'),f=[{'code':'RC-FIND-03','title':'Cross-allocation\x20settlement','detail':'Submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation;\x20destination\x20stays\x20at\x20an\x20order\x20owner.'},{'code':'RC-FIND-06','title':'Forced\x20settlement\x20timing','detail':'alloc\x20is\x20permissionless;\x20settlement\x20can\x20be\x20triggered\x20by\x20anyone\x20once\x20conditions\x20hold.'},{'code':'RC-RES-01','title':'Published\x20immutability','detail':'order_allocators,\x20Machine\x20and\x20Guards\x20are\x20immutable\x20after\x20publish.'},{'code':'RC-RES-03','title':'Off-chain\x20arbitration\x20backstop','detail':'No\x20on-chain\x20clawback;\x20post-incident\x20recovery\x20relies\x20on\x20arbitration.'}];return{'version':RECIPIENT_CONSTRAINT_VERSION,'scope':{'trigger_source':a['trigger_source'],'host_service':a['host_service'],'allocation':a['allocation']},'allocators':b,'findings':c,'unavoidable':f,'safe_destination':e,'overall':d,'summary':'Analyzed\x20'+b['length']+'\x20allocator(s):\x20'+c['filter'](g=>!g['unavoidable'])['length']+'\x20actionable,\x20'+(c['filter'](g=>g['unavoidable'])['length']+'\x20structural\x20finding(s).\x20Safe\x20destination:\x20'+e+'.')};}export function derivePayoffFromSharing(a,b,c){const d=asNode(c?.['root']),e=c?.['table']??[],f=d?extractConstraints(d,e):[],g=a['map'](i=>{const j=classifyRecipient(i['who'])??{'kind':'entity','address':'(unclassifiable)'},k=j['kind']==='submission'?j['identifier']:undefined,l=k!==undefined?e['find'](n=>n['identifier']===k):undefined,m=k!==undefined?deriveReceiptRight(k,f):undefined;return{'spec':j,'slot_value_type':l?normalizeValueType(l['value_type']):undefined,'constraints':k!==undefined?f['filter'](n=>n['slot']===undefined||n['slot']===k):f,'receipt':m,'beneficial_owner':deriveBeneficialOwner(j,m)};}),h={'guard':'','recipients':g,'slots':[],'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return buildPayoff(h,b);}function normalizeValueType(a){if(typeof a==='number')return a;const b={'bool':ValueType['Bool'],'address':ValueType['Address'],'string':ValueType['String'],'u64':ValueType['U64'],'u256':ValueType['U256']};return b[a['toLowerCase']()];}export function isUnboundSignerTheft(a){return a['recipient_is_signer']&&!a['caller_identity_constrained'];}export function canonicalDoctrine(a){switch(a){case'RC-FIND-01':return{'severity':'CRITICAL','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.'};case'RC-FIND-03':return{'severity':'MEDIUM','title':'Cross-allocation\x20settlement\x20residual','mitigation':'Accept\x20with\x20monitoring,\x20or\x20use\x20a\x20fixed\x20Entity\x20recipient\x20when\x20the\x20destination\x20is\x20known\x20ahead\x20of\x20time.'};case'RC-FIND-06':return{'severity':'LOW','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.'};}}export const RECIPIENT_DESIGN_OPTIONS=[{'id':'entity','move_recipient':'Recipient::Entity(address)','semantics':'Funds\x20flow\x20to\x20a\x20fixed\x20address\x20(a\x20constrained\x20user\x20account\x20/\x20treasury).\x20'+'Destination\x20never\x20depends\x20on\x20the\x20caller.','required_constraints':['The\x20address\x20is\x20chosen\x20at\x20design\x20time\x20and\x20recorded\x20in\x20the\x20allocator\x20table.']},{'id':'submitted_object','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20the\x20object\x20submitted\x20under\x20protocol\x20context\x20(e.g.\x20the\x20order\x20being\x20settled).\x20'+'Receivable\x20only\x20by\x20that\x20object\x27s\x20owner\x20—\x20object\x20receipt\x20=\x20owner\x20receipt.','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(which\x20query/object\x20type\x20the\x20slot\x20carries).','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20by\x20allocator_add).'],'finding_if_unmet':'RC-FIND-02\x20/\x20RC-FIND-07'},{'id':'signer','move_recipient':'Recipient::Signer','semantics':'Funds\x20flow\x20to\x20the\x20caller\x20who\x20executes\x20the\x20permissionless\x20alloc.\x20'+'Safe\x20only\x20when\x20the\x20Guard\x20proves\x20exactly\x20who\x20the\x20caller\x20may\x20be.','required_constraints':['The\x20Guard\x20constrains\x20the\x20Signer\x20identity\x20(signer\x20==\x20a\x20fixed\x20address\x20or\x20a\x20derived\x20legitimate\x20owner).'],'finding_if_unmet':'RC-FIND-01'},{'id':'constrained_submission','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20an\x20object\x20address\x20supplied\x20by\x20the\x20signer,\x20but\x20the\x20Guard\x20constrains\x20'+'both\x20the\x20submission\x20scope\x20and\x20the\x20signer\x27s\x20relation\x20to\x20it\x20(e.g.\x20the\x20signer\x20owns\x20the\x20submitted\x20order).','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(object/query\x20type).','The\x20Guard\x20binds\x20the\x20signer\x20to\x20the\x20submitted\x20object.','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20by\x20allocator_add).'],'finding_if_unmet':'RC-FIND-01\x20/\x20RC-FIND-02\x20/\x20RC-FIND-07'}];export function recipientDesignGuidance(){return RECIPIENT_DESIGN_OPTIONS;}export const OBJECT_DRIVEABILITY=[{'object_type':'order','receive_entries':['order::owner_receive','order::owner_receive_object'],'anyone_drivable':!![],'funds_settle_to':'order.owner','rationale':'Order\x20is\x20a\x20shared\x20object\x20and\x20extraction\x20has\x20no\x20signer\x20gate;\x20'+'Receiving\x20is\x20restricted\x20to\x20objects\x20actually\x20delivered\x20to\x20that\x20order,\x20and\x20coins\x20settle\x20to\x20its\x20owner.'},{'object_type':'permission','receive_entries':['permission::owner_receive','permission::owner_receive_object'],'anyone_drivable':!![],'funds_settle_to':'permission.owner','rationale':'Permission\x20is\x20the\x20final\x20authority;\x20anyone\x20can\x20drive\x20extraction\x20of\x20funds\x20sent\x20to\x20its\x20address,\x20but\x20the\x20destination\x20is\x20its\x20owner.'},{'object_type':'service','receive_entries':['service::owner_receive','service::owner_receive_object'],'anyone_drivable':![],'permission_index':0x13f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20319);\x20members\x20drive,\x20value\x20settles\x20to\x20the\x20organization\x20owner.'},{'object_type':'treasury','receive_entries':['treasury::owner_receive','treasury::owner_receive_object'],'anyone_drivable':![],'permission_index':0x101,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20257).'},{'object_type':'arbitration','receive_entries':['arbitration::owner_receive','arbitration::owner_receive_object'],'anyone_drivable':![],'permission_index':0x16f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20367).'},{'object_type':'machine','receive_entries':['machine::owner_receive','machine::owner_receive_object'],'anyone_drivable':![],'permission_index':0xcf,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20207).'},{'object_type':'progress','receive_entries':['progress::owner_receive','progress::owner_receive_object'],'anyone_drivable':![],'permission_index':0xe1,'funds_settle_to':'machine\x27s\x20permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20225),\x20scoped\x20to\x20the\x20Machine\x20permission.'},{'object_type':'demand','receive_entries':['demand::owner_receive','demand::owner_receive_object'],'anyone_drivable':![],'permission_index':0x197,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20407).'},{'object_type':'contact','receive_entries':['contact::owner_receive','contact::owner_receive_object'],'anyone_drivable':![],'permission_index':0x1c6,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20454).'}];export function driveabilityOf(a){return OBJECT_DRIVEABILITY['find'](b=>b['object_type']===a);}
|
|
1
|
+
import{ValueType}from'@wowok/wowok';import{getGuardQueryByIdOrName}from'../schema/utils/guard-query-utils.js';function asNode(a){if(typeof a!=='object'||a===null)return null;const b=a['type'];return typeof b==='string'?a:null;}function queryMeta(a){if(typeof a!=='number'&&typeof a!=='string')return null;const b=getGuardQueryByIdOrName(a);return b?{'id':b['id'],'name':b['name']}:null;}function childNodes(a){const b=[];if(Array['isArray'](a['nodes']))a['nodes']['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);});if(asNode(a['node']))b['push'](asNode(a['node']));return[a['nodeLeft'],a['nodeRight']]['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);}),b;}export function classifyRecipient(a){if(typeof a!=='object'||a===null)return null;const b=a;if(typeof b['Entity']==='string')return{'kind':'entity','address':b['Entity']};const c=b['Entity'];if(c&&typeof c==='object'&&typeof c['name_or_address']==='string')return{'kind':'entity','address':c['name_or_address']};if(b['Signer']==='signer'||b['Signer']===!![])return{'kind':'signer'};if(typeof b['GuardIdentifier']==='number')return{'kind':'submission','identifier':b['GuardIdentifier']};return null;}function leafInfo(a,b){if(a['type']==='context'&&typeof a['context']==='string'){if(a['context']==='Signer')return{'kind':'signer'};if(a['context']==='Clock')return{'kind':'clock'};}if(a['type']==='query'){const c=queryMeta(a['query']),d=a['object'];if(c&&d&&typeof d['identifier']==='number')return{'kind':'query','query_name':c['name'],'query_id':c['id'],'object_identifier':d['identifier'],'convert_witness':d['convert_witness']};}if(a['type']==='identifier'){const e=typeof a['identifier']==='number'?a['identifier']:-0x1,f=b['find'](g=>g['identifier']===e);if(f){const g=typeof f['value']==='string'?f['value']:undefined;if(f['value_type']===ValueType['Address'])return{'kind':'static_address','value':g};if(f['value_type']===ValueType['String'])return{'kind':'static_string','value':g};}}return{'kind':'other'};}function comparisonLeaves(a,b){if(a['type']==='logic_equal'){const c=childNodes(a)['map'](d=>flattenLeaf(d,b));return c;}return[];}function flattenLeaf(a,b){if(a['type']==='logic_not'){const d=childNodes(a)[0x0];return d?flattenLeaf(d,b):{'kind':'other'};}return leafInfo(a,b);}function isOrderProgressWitness(a){if(a===0x64)return!![];return typeof a==='string'&&a['toLowerCase']()['includes']('orderprogress');}function describe(a){switch(a){case'service_binding':return'Submitted\x20object\x20must\x20belong\x20to\x20the\x20expected\x20service';case'progress_node_state':return'Submitted\x20order\x20must\x20be\x20at\x20a\x20qualifying\x20workflow\x20node';case'signer_is_submitted_object_owner':return'Caller\x20must\x20be\x20the\x20owner\x20of\x20the\x20submitted\x20object';case'signer_authorized_entity':return'Caller\x20must\x20equal\x20a\x20fixed\x20authorized\x20address';case'signer_permission_member':return'Caller\x20must\x20satisfy\x20a\x20Permission\x20membership\x20rule';case'time_lock':return'Current\x20time\x20must\x20satisfy\x20the\x20time-lock';case'repository_crosscheck':return'Repository\x20data\x20must\x20satisfy\x20the\x20cross-check';default:return'Other\x20guard\x20constraint';}}function extractConstraints(a,b){const c=[],d=new Set(),e=h=>{const i=h['code']+':'+(h['slot']??'-');!d['has'](i)&&(d['add'](i),c['push'](h));},f=(h,i)=>({'path':h,'queries':i}),g=(h,i)=>{const j=comparisonLeaves(h,b);if(j['length']>=0x2){const k=j['find'](r=>r['kind']==='signer'),l=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.owner'),m=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.service'),n=j['find'](r=>r['kind']==='query'&&r['query_name']==='progress.current'),o=j['find'](r=>r['kind']==='static_address'),p=j['find'](r=>r['kind']==='static_string');k&&l&&e({'code':'signer_is_submitted_object_owner','slot':l['object_identifier'],'description':describe('signer_is_submitted_object_owner'),'caller_constraint':!![],'evidence':f(i,['Signer','order.owner'])});k&&o&&e({'code':'signer_authorized_entity','description':describe('signer_authorized_entity'),'caller_constraint':!![],'evidence':f(i,['Signer'])});m&&o&&e({'code':'service_binding','slot':m['object_identifier'],'description':describe('service_binding'),'caller_constraint':![],'evidence':f(i,['order.service'])});if(n&&p){const r=n['object_identifier'];isOrderProgressWitness(n['convert_witness'])&&e({'code':'progress_node_state','slot':r,'description':describe('progress_node_state'),'caller_constraint':![],'evidence':f(i,['progress.current'])});}}if(h['type']['startsWith']('logic_as_u256')||h['type']==='calc_number_add'){const s=[h,...childNodes(h)]['map'](t=>flattenLeaf(t,b));if(s['some'](t=>t['kind']==='clock')&&s['some'](t=>t['kind']==='query'&&(t['query_name']==='progress.current_time'||t['query_name']==='progress.session.forward.time'))){const t=s['find'](u=>u['kind']==='query');e({'code':'time_lock','slot':t['object_identifier'],'description':describe('time_lock'),'caller_constraint':![],'evidence':f(i,['Clock',t['query_name']])});}}if(h['type']==='query'){const u=queryMeta(h['query']);if(u&&u['name']['startsWith']('repository.')){const v=h['object'];e({'code':'repository_crosscheck','slot':v?.['identifier'],'description':describe('repository_crosscheck'),'caller_constraint':![],'evidence':f(i,[u['name']])});}}childNodes(h)['forEach']((w,x)=>g(w,i+'/'+x));};return g(a,'/root'),c;}function findSessionQueries(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']);if(f&&(f['id']===0x4f6||f['id']===0x4f7))b['push'](e);}childNodes(d)['forEach']((g,h)=>c(g,e+'/'+h));};return c(a,'/root'),b;}function collectSlotUsages(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']),g=d['object'];f&&g&&typeof g['identifier']==='number'&&b['push']({'slot':g['identifier'],'path':e,'query_id':f['id'],'query_name':f['name'],...g['convert_witness']!==undefined?{'convert_witness':g['convert_witness']}:{}});}childNodes(d)['forEach']((h,j)=>c(h,e+'/'+j));};return c(a,'/root'),b;}function deriveReceiptRight(a,b){const c=b['find'](e=>e['code']==='progress_node_state'&&e['slot']===a),d=b['find'](e=>e['code']==='signer_is_submitted_object_owner'&&e['slot']===a);if(c||d)return{'object_type':'order','receive_entry':'order::owner_receive','guarantee':'Delivered\x20funds\x20are\x20owned\x20by\x20the\x20submitted\x20Order;\x20only\x20its\x20current\x20owner\x20can\x20'+'extract\x20them\x20(&mut\x20Order\x20input),\x20and\x20coins\x20transfer\x20to\x20that\x20owner.'};return undefined;}function deriveBeneficialOwner(a,b){switch(a['kind']){case'entity':return'Fixed\x20entity\x20'+a['address'];case'signer':return'Transaction\x20caller\x20(Signer)\x20—\x20direct\x20wallet';case'submission':return b?'Owner\x20of\x20the\x20submitted\x20object\x20at\x20table['+a['identifier']+']\x20(object\x20receipt\x20=\x20owner\x20receipt)':'Address\x20submitted\x20at\x20table['+a['identifier']+']\x20(caller-provided)';}}function buildSlotModels(a,b,c,d){const e=[...new Set(c['map'](f=>f['spec'])['filter'](f=>f['kind']==='submission')['map'](f=>f['identifier']))];return e['map'](f=>{const g=a['find'](p=>p['identifier']===f),h=g?normalizeValueType(g['value_type']):undefined,i=h===ValueType['Address'],j=b['filter'](p=>p['slot']===f),k=c['filter'](p=>p['spec']['kind']==='submission'&&p['spec']['identifier']===f)['map'](p=>p['mode']??'Unknown'),l=d['filter'](p=>p['slot']===undefined||p['slot']===f),m=deriveReceiptRight(f,d),n=l['some'](p=>p['code']==='service_binding'||p['code']==='repository_crosscheck'||p['code']==='signer_permission_member'),o=[];if(h!==undefined&&!i)o['push']('RC-FIND-07');if(!n)o['push']('RC-FIND-02');if(m?.['object_type']==='order')o['push']('RC-FIND-03');return{'identifier':f,'externally_submitted':g?.['b_submission']??!![],...h!==undefined?{'declared_value_type':h}:{},'is_address':i,'usages':j,'recipient_modes':k,'constraints':l,...m?{'receipt':m}:{},'beneficial_owner':deriveBeneficialOwner({'kind':'submission','identifier':f},m),'assessment':{'address_typed':i,'scope_bound':n,'object_receipt':m?.['object_type']==='order'},'findings':o};});}function buildSlotFinding(a,b,c){const d=a['identifier'];switch(b){case'RC-FIND-07':return{'code':b,'severity':'MEDIUM','title':'Submission\x20slot\x20'+d+'\x20is\x20not\x20address-typed','explanation':'GuardIdentifier\x20recipients\x20require\x20an\x20address-typed\x20table\x20entry\x20'+'(enforced\x20by\x20allocator_add\x20/\x20ERECIPIENT_IDENTIFIER_NOT_ADDRESS).','evidence_paths':c,'mitigation':'Set\x20the\x20slot\x20value_type\x20to\x20Address,\x20or\x20use\x20an\x20Entity\x20recipient.','unavoidable':![]};case'RC-FIND-02':return{'code':b,'severity':'HIGH','title':'Submission\x20slot\x20'+d+'\x20has\x20no\x20scope\x20binding','explanation':'Nothing\x20constrains\x20which\x20submitted\x20objects/addresses\x20qualify:\x20no\x20'+'service\x20binding,\x20repository\x20cross-check\x20or\x20permission\x20membership.\x20A\x20caller\x20'+'can\x20submit\x20arbitrary\x20qualifying-by-other-conditions\x20inputs.','evidence_paths':c,'mitigation':'Add\x20a\x20constraint\x20binding\x20the\x20slot\x20(e.g.\x20order.service\x20==\x20host\x20service).','unavoidable':![]};case'RC-FIND-03':return{'code':b,'severity':'MEDIUM','title':'Cross-allocation\x20settlement\x20residual','explanation':'The\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20Allocation\x20being\x20settled\x20'+'(alloc\x20is\x20permissionless\x20and\x20allocation\x20context\x20is\x20not\x20a\x20Guard\x20input).\x20A\x20'+'caller\x20owning\x20ANY\x20qualifying\x20order\x20can\x20settle\x20OTHER\x20allocations;\x20funds\x20land\x20'+'at\x20the\x20submitted\x20order\x20and\x20are\x20receivable\x20by\x20its\x20owner.\x20Destination\x20is\x20safe\x20'+'(an\x20order\x20owner),\x20allocation\x20choice\x20is\x20the\x20residual.','evidence_paths':c,'mitigation':'Pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20competition\x20semantics\x20—\x20declare\x20that\x20any\x20qualifying\x20order\x20may\x20settle\x20'+'this\x20allocation\x20and\x20cap\x20the\x20exposure\x20(sharing\x20threshold\x20/\x20max\x20amount);\x20'+'(2)\x20Entity\x20routing\x20—\x20use\x20a\x20fixed\x20Entity\x20(treasury)\x20recipient,\x20the\x20only\x20'+'exclusive\x20choice\x20on\x20the\x20automatic\x20order_allocators\x20route\x20(trust\x20shifts\x20to\x20'+'the\x20entity\x20operator);\x20'+'(3)\x20per-order\x20pinned\x20Guards\x20—\x20abandon\x20automatic\x20order_allocators\x20and\x20attach\x20'+'a\x20per-order\x20Guard\x20pinning\x20the\x20order\x20id\x20(order.owner\x20==\x20constant),\x20the\x20'+'trustless\x20exclusive\x20route.','unavoidable':!![],'resolution_required':!![]};default:return{'code':b,'severity':'LOW','title':'Slot\x20'+d+'\x20finding\x20'+b,'explanation':'','evidence_paths':c,'mitigation':'','unavoidable':![]};}}function buildFindings(a,b){const c=[];let d=![],e=![];for(const f of b){const g=f['recipients']['flatMap'](h=>h['constraints'])['filter'](h=>h['caller_constraint']);if(g['length']>0x0)d=!![];if(f['slots']['some'](h=>h['assessment']['scope_bound']))e=!![];for(const h of f['recipients']){const i=h['constraints']['map'](j=>j['evidence']['path']);h['spec']['kind']==='signer'&&g['length']===0x0&&c['push']({'code':'RC-FIND-01','severity':'CRITICAL','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','explanation':'Funds\x20are\x20delivered\x20directly\x20to\x20the\x20transaction\x20caller,\x20but\x20the\x20Guard\x20'+'does\x20not\x20bind\x20the\x20Signer\x20to\x20an\x20authorized\x20identity.\x20Anyone\x20who\x20satisfies\x20the\x20'+'other\x20conditions\x20steals\x20the\x20funds.','evidence_paths':i,'mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.','unavoidable':![]});}for(const j of f['slots']){const k=j['constraints']['map'](l=>l['evidence']['path']);for(const l of j['findings']){c['push'](buildSlotFinding(j,l,k));}}}a['trigger_source']==='standalone'&&!d&&c['push']({'code':'RC-FIND-04','severity':'HIGH','title':'Standalone\x20allocation\x20without\x20issuer\x20identity\x20constraint','explanation':'Standalone\x20allocations\x20have\x20no\x20Service/Arbitration\x20access-control\x20layer.\x20'+'Without\x20a\x20Signer/permission\x20binding\x20in\x20the\x20Guard,\x20anyone\x20can\x20trigger\x20distribution.','evidence_paths':[],'mitigation':'Bind\x20the\x20issuer\x20(Signer==owner/admin)\x20or\x20move\x20the\x20allocation\x20into\x20a\x20Service.','unavoidable':![]});c['push']({'code':'RC-FIND-06','severity':'LOW','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','explanation':'Once\x20the\x20Guard\x27s\x20conditions\x20are\x20satisfiable,\x20anyone\x20can\x20trigger\x20settlement\x20of\x20an\x20'+'order\x27s\x20allocation.\x20With\x20Entity/object\x20recipients\x20this\x20affects\x20timing\x20only,\x20not\x20destination.','evidence_paths':[],'mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.','unavoidable':!![]});for(const [m,n]of Object['entries'](a['guards']??{})){const o=asNode(n['root']);if(!o)continue;for(const q of findSessionQueries(o)){c['push']({'code':'RC-FIND-05','severity':'MEDIUM','title':'Guard\x20'+m+'\x20uses\x20session-only\x20query\x20at\x20'+q,'explanation':'Queries\x201270/1271\x20read\x20the\x20active\x20session;\x20after\x20the\x20session\x20migrates\x20to\x20'+'history\x20the\x20query\x20aborts\x20(W_FIELD_NOT_FOUND)\x20and\x20the\x20Guard\x20permanently\x20fails.','evidence_paths':[q],'mitigation':'Use\x20progress.current_time\x20(1272)\x20or\x20history\x20queries\x20(1274-1279).','unavoidable':![]});}}for(const [s,t]of Object['entries'](a['guards']??{})){const u=(t['relies']??[])['filter'](v=>typeof v==='string'&&v);if(u['length']===0x0)continue;c['push']({'code':'RC-FIND-08','severity':'LOW','title':'Guard\x20'+s+'\x20relies\x20on\x20'+u['length']+'\x20sub-guard(s)\x20—\x20not\x20credited\x20by\x20this\x20audit','explanation':'Guard\x20composition\x20(relies,\x20one\x20level,\x20≤4,\x20'+((t['relies_logic_and']===![]?'OR':'AND')+'-logic)\x20may\x20carry\x20the\x20scope/signer\x20')+'constraints\x20in\x20the\x20relied\x20sub-guards.\x20This\x20audit\x20evaluates\x20only\x20the\x20guard\x27s\x20own\x20root:\x20'+'sub-guard\x20constraints\x20are\x20NOT\x20credited,\x20so\x20scope-binding\x20gaps\x20(RC-FIND-02)\x20may\x20be\x20'+'over-reported\x20and\x20sub-guard-only\x20conditions\x20stay\x20unverified.','evidence_paths':u,'mitigation':'Resolve\x20the\x20relied\x20sub-guards\x20and\x20verify\x20their\x20constraints\x20manually,\x20or\x20re-run\x20'+'with\x20the\x20sub-guard\x20defs\x20included\x20(read-side\x20resolvers\x20attach\x20them\x20automatically).','unavoidable':![]});}if(!e&&a['trigger_source']==='service_order_allocators'){}return c;}function buildPayoff(a,b){const c=a['recipients']['some'](h=>h['constraints']['some'](i=>i['caller_constraint'])),d=c?'Caller\x20must\x20satisfy\x20the\x20Guard\x27s\x20Signer/identity\x20binding':b==='standalone'?'Any\x20caller\x20(no\x20identity\x20binding)':'Any\x20caller\x20who\x20satisfies\x20the\x20Guard\x27s\x20object/state\x20conditions',e=a['recipients']['map'](h=>h['beneficial_owner'])['join'](';\x20')||'(none)',f={},g=a['recipients']['some'](h=>h['spec']['kind']==='signer'&&!c);return f['caller']=g?'gains':c?'conditional':'neutral',f['provider']=a['recipients']['some'](h=>h['spec']['kind']==='entity')?'gains':'conditional',f['customer']=a['recipients']['some'](h=>h['receipt']?.['object_type']==='order')?'conditional':'neutral',f['system']='neutral',{'caller_eligibility':d,'beneficial_recipient':e,'positions':f};}export const RECIPIENT_CONSTRAINT_VERSION='1.2.0';export function analyzeRecipientConstraints(a){const b=a['allocators']['map'](h=>{const i=a['guards']?.[h['guard']],j=asNode(i?.['root']),k=i?.['table']??[],l=j?extractConstraints(j,k):[],m=j?collectSlotUsages(j):[],n=h['sharing']['map'](q=>{const r=classifyRecipient(q['who']);if(!r)return{'spec':{'kind':'entity','address':'(unclassifiable)'},'constraints':l,'beneficial_owner':'Unclassifiable\x20recipient\x20—\x20check\x20allocator\x20config'};const t=r['kind']==='submission'?r['identifier']:undefined,u=t!==undefined?k['find'](w=>w['identifier']===t):undefined,v=t!==undefined?deriveReceiptRight(t,l):undefined;return{'spec':r,'slot_value_type':u?normalizeValueType(u['value_type']):undefined,'constraints':t!==undefined?l['filter'](w=>w['slot']===undefined||w['slot']===t):l,'receipt':v,'beneficial_owner':deriveBeneficialOwner(r,v)};}),o=buildSlotModels(k,m,h['sharing']['map'](q=>({'spec':classifyRecipient(q['who'])??{'kind':'entity','address':'(unclassifiable)'},'mode':q['mode']})),l),p={'guard':h['guard'],'recipients':n,'slots':o,'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return p['payoff']=buildPayoff(p,a['trigger_source']),p;}),c=buildFindings(a,b),d=c['some'](h=>h['severity']==='CRITICAL')?'CRITICAL':c['some'](h=>h['severity']==='HIGH')?'HIGH':c['some'](h=>h['severity']==='MEDIUM')?'MEDIUM':'LOW',e=!c['some'](h=>h['code']==='RC-FIND-01'),f=c['some'](h=>h['resolution_required']),g=[{'code':'RC-FIND-03','title':'Cross-allocation\x20settlement','detail':'Submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation;\x20destination\x20stays\x20at\x20an\x20order\x20owner.'},{'code':'RC-FIND-06','title':'Forced\x20settlement\x20timing','detail':'alloc\x20is\x20permissionless;\x20settlement\x20can\x20be\x20triggered\x20by\x20anyone\x20once\x20conditions\x20hold.'},{'code':'RC-RES-01','title':'Published\x20immutability','detail':'order_allocators,\x20Machine\x20and\x20Guards\x20are\x20immutable\x20after\x20publish.'},{'code':'RC-RES-03','title':'Off-chain\x20arbitration\x20backstop','detail':'No\x20on-chain\x20clawback;\x20post-incident\x20recovery\x20relies\x20on\x20arbitration.'}];return{'version':RECIPIENT_CONSTRAINT_VERSION,'scope':{'trigger_source':a['trigger_source'],'host_service':a['host_service'],'allocation':a['allocation']},'allocators':b,'findings':c,'unavoidable':g,'safe_destination':e,'resolution_required':f,'overall':d,'summary':'Analyzed\x20'+b['length']+'\x20allocator(s):\x20'+c['filter'](h=>!h['unavoidable'])['length']+'\x20actionable,\x20'+(c['filter'](h=>h['unavoidable'])['length']+'\x20structural\x20finding(s).\x20Safe\x20destination:\x20'+e+'.')+(''+(f?'\x20Resolution\x20REQUIRED:\x20at\x20least\x20one\x20residual\x20demands\x20an\x20explicit\x20design\x20decision\x20before\x20publish.':''))};}export function derivePayoffFromSharing(a,b,c){const d=asNode(c?.['root']),e=c?.['table']??[],f=d?extractConstraints(d,e):[],g=a['map'](i=>{const j=classifyRecipient(i['who'])??{'kind':'entity','address':'(unclassifiable)'},k=j['kind']==='submission'?j['identifier']:undefined,l=k!==undefined?e['find'](n=>n['identifier']===k):undefined,m=k!==undefined?deriveReceiptRight(k,f):undefined;return{'spec':j,'slot_value_type':l?normalizeValueType(l['value_type']):undefined,'constraints':k!==undefined?f['filter'](n=>n['slot']===undefined||n['slot']===k):f,'receipt':m,'beneficial_owner':deriveBeneficialOwner(j,m)};}),h={'guard':'','recipients':g,'slots':[],'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return buildPayoff(h,b);}function normalizeValueType(a){if(typeof a==='number')return a;const b={'bool':ValueType['Bool'],'address':ValueType['Address'],'string':ValueType['String'],'u64':ValueType['U64'],'u256':ValueType['U256']};return b[a['toLowerCase']()];}export function isUnboundSignerTheft(a){return a['recipient_is_signer']&&!a['caller_identity_constrained'];}export function canonicalDoctrine(a){switch(a){case'RC-FIND-01':return{'severity':'CRITICAL','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.'};case'RC-FIND-03':return{'severity':'MEDIUM','title':'Cross-allocation\x20settlement\x20residual','mitigation':'Pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20competition\x20semantics\x20with\x20capped\x20exposure\x20(threshold\x20/\x20max\x20amount);\x20'+'(2)\x20Entity\x20routing\x20(treasury)\x20—\x20the\x20only\x20exclusive\x20choice\x20on\x20the\x20automatic\x20'+'order_allocators\x20route;\x20'+'(3)\x20per-order\x20pinned\x20Guards\x20(order.owner\x20==\x20constant)\x20—\x20the\x20trustless\x20'+'exclusive\x20route.','resolution_required':!![]};case'RC-FIND-06':return{'severity':'LOW','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.'};}}export const RECIPIENT_DESIGN_OPTIONS=[{'id':'entity','move_recipient':'Recipient::Entity(address)','semantics':'Funds\x20flow\x20to\x20a\x20fixed\x20address\x20(a\x20constrained\x20user\x20account\x20/\x20treasury).\x20'+'Destination\x20never\x20depends\x20on\x20the\x20caller.','required_constraints':['The\x20address\x20is\x20chosen\x20at\x20design\x20time\x20and\x20recorded\x20in\x20the\x20allocator\x20table.']},{'id':'submitted_object','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20the\x20object\x20submitted\x20under\x20protocol\x20context\x20(e.g.\x20the\x20order\x20being\x20settled).\x20'+'Receivable\x20only\x20by\x20that\x20object\x27s\x20owner\x20—\x20object\x20receipt\x20=\x20owner\x20receipt.','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(which\x20query/object\x20type\x20the\x20slot\x20carries).','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20by\x20allocator_add).'],'finding_if_unmet':'RC-FIND-02\x20/\x20RC-FIND-07'},{'id':'signer','move_recipient':'Recipient::Signer','semantics':'Funds\x20flow\x20to\x20the\x20caller\x20who\x20executes\x20the\x20permissionless\x20alloc.\x20'+'Safe\x20only\x20when\x20the\x20Guard\x20proves\x20exactly\x20who\x20the\x20caller\x20may\x20be.','required_constraints':['The\x20Guard\x20constrains\x20the\x20Signer\x20identity\x20(signer\x20==\x20a\x20fixed\x20address\x20or\x20a\x20derived\x20legitimate\x20owner).'],'finding_if_unmet':'RC-FIND-01'},{'id':'constrained_submission','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20an\x20object\x20address\x20supplied\x20by\x20the\x20signer,\x20but\x20the\x20Guard\x20constrains\x20'+'both\x20the\x20submission\x20scope\x20and\x20the\x20signer\x27s\x20relation\x20to\x20it\x20(e.g.\x20the\x20signer\x20owns\x20the\x20submitted\x20order).','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(object/query\x20type).','The\x20Guard\x20binds\x20the\x20signer\x20to\x20the\x20submitted\x20object.','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20by\x20allocator_add).'],'finding_if_unmet':'RC-FIND-01\x20/\x20RC-FIND-02\x20/\x20RC-FIND-07'}];export function recipientDesignGuidance(){return RECIPIENT_DESIGN_OPTIONS;}export const OBJECT_DRIVEABILITY=[{'object_type':'order','receive_entries':['order::owner_receive','order::owner_receive_object'],'anyone_drivable':!![],'funds_settle_to':'order.owner','rationale':'Order\x20is\x20a\x20shared\x20object\x20and\x20extraction\x20has\x20no\x20signer\x20gate;\x20'+'Receiving\x20is\x20restricted\x20to\x20objects\x20actually\x20delivered\x20to\x20that\x20order,\x20and\x20coins\x20settle\x20to\x20its\x20owner.'},{'object_type':'permission','receive_entries':['permission::owner_receive','permission::owner_receive_object'],'anyone_drivable':!![],'funds_settle_to':'permission.owner','rationale':'Permission\x20is\x20the\x20final\x20authority;\x20anyone\x20can\x20drive\x20extraction\x20of\x20funds\x20sent\x20to\x20its\x20address,\x20but\x20the\x20destination\x20is\x20its\x20owner.'},{'object_type':'service','receive_entries':['service::owner_receive','service::owner_receive_object'],'anyone_drivable':![],'permission_index':0x13f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20319);\x20members\x20drive,\x20value\x20settles\x20to\x20the\x20organization\x20owner.'},{'object_type':'treasury','receive_entries':['treasury::owner_receive','treasury::owner_receive_object'],'anyone_drivable':![],'permission_index':0x101,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20257).'},{'object_type':'arbitration','receive_entries':['arbitration::owner_receive','arbitration::owner_receive_object'],'anyone_drivable':![],'permission_index':0x16f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20367).'},{'object_type':'machine','receive_entries':['machine::owner_receive','machine::owner_receive_object'],'anyone_drivable':![],'permission_index':0xcf,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20207).'},{'object_type':'progress','receive_entries':['progress::owner_receive','progress::owner_receive_object'],'anyone_drivable':![],'permission_index':0xe1,'funds_settle_to':'machine\x27s\x20permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20225),\x20scoped\x20to\x20the\x20Machine\x20permission.'},{'object_type':'demand','receive_entries':['demand::owner_receive','demand::owner_receive_object'],'anyone_drivable':![],'permission_index':0x197,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20407).'},{'object_type':'contact','receive_entries':['contact::owner_receive','contact::owner_receive_object'],'anyone_drivable':![],'permission_index':0x1c6,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20454).'}];export function driveabilityOf(a){return OBJECT_DRIVEABILITY['find'](b=>b['object_type']===a);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{adaptNodeAnalyzer}from'../graph/onchain/index.js';import{analyzeRecipientConstraints}from'./recipient-constraint.js';export const SERVICE_ALLOCATOR_AUDIT_NODE_ANALYZER_ID='ALC1';const ROLES_FUND_RISK=['neutral','system','merchant','buyer'];function severityOf(a){if(a['severity']==='CRITICAL'||a['severity']==='HIGH')return'high';if(a['severity']==='MEDIUM')return a['resolution_required']?'high':'medium';return'low';}const COPY={'RC-FIND-01':{'title':'Fund\x20theft\x20risk:\x20Signer\x20recipient\x20without\x20caller\x20identity\x20constraint','detail':(a,b)=>'The\x20order\x20allocator\x20Guard\x20of\x20service\x20'+a+'\x20delivers\x20funds\x20directly\x20to\x20the\x20transaction\x20caller\x20'+'(Recipient::Signer)\x20but\x20binds\x20the\x20Signer\x20to\x20no\x20authorized\x20identity\x20—\x20anyone\x20satisfying\x20the\x20'+('remaining\x20conditions\x20can\x20take\x20the\x20funds\x20(rule\x20'+b['code']+',\x20evidence\x20paths\x20')+((b['evidence_paths']['join'](',\x20')||'(root)')+').'),'suggestion':'Fix\x20immediately:\x20bind\x20the\x20Signer\x20to\x20a\x20fixed\x20address\x20or\x20a\x20derived\x20identity\x20such\x20as\x20'+'order.owner,\x20or\x20switch\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot;\x20do\x20NOT\x20pay\x20this\x20service\x20before\x20the\x20fix.'},'RC-FIND-02':{'title':'Insufficient\x20allocation\x20condition:\x20submission\x20slot\x20has\x20no\x20scope\x20binding','detail':(a,b)=>'The\x20order\x20allocator\x20Guard\x20of\x20service\x20'+a+'\x20leaves\x20its\x20submission\x20slot\x20without\x20any\x20scope\x20'+'constraint\x20(no\x20order.service\x20binding,\x20no\x20repository\x20cross-check,\x20no\x20permission\x20membership):\x20'+('a\x20caller\x20can\x20submit\x20arbitrary\x20qualifying\x20objects/addresses\x20to\x20claim\x20the\x20funds\x20(rule\x20'+b['code']+',\x20')+('evidence\x20paths\x20'+(b['evidence_paths']['join'](',\x20')||'(root)')+').'),'suggestion':'Require\x20the\x20merchant\x20to\x20add\x20order.service\x20==\x20this\x20service\x20(query\x201563)\x20before\x20ordering;\x20'+'an\x20unbound\x20recipient\x20slot\x20can\x20be\x20claimed\x20by\x20others.'},'RC-FIND-03':{'title':'Cross-order\x20settlement\x20residual\x20(explicit\x20resolution\x20required)','detail':(a,b)=>'When\x20the\x20order\x20allocator\x20Guard\x20of\x20service\x20'+a+'\x20pays\x20the\x20submitted\x20order\x20object,\x20that\x20order\x20'+'is\x20not\x20bound\x20to\x20the\x20Allocation\x20being\x20settled\x20(alloc\x20is\x20permissionless\x20and\x20allocation\x20context\x20is\x20'+'not\x20a\x20Guard\x20input):\x20a\x20caller\x20owning\x20ANY\x20qualifying\x20order\x20can\x20settle\x20OTHER\x20allocations.\x20Funds\x20'+'still\x20land\x20at\x20the\x20submitted\x20order\x20and\x20only\x20its\x20owner\x20can\x20withdraw\x20—\x20destination\x20is\x20safe,\x20the\x20'+('pool\x20CHOICE\x20is\x20the\x20residual\x20(rule\x20'+b['code']+',\x20evidence\x20paths\x20'+(b['evidence_paths']['join'](',\x20')||'(root)')+').'),'suggestion':'Require\x20the\x20merchant\x20to\x20pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20declare\x20competition\x20semantics\x20and\x20cap\x20exposure\x20via\x20threshold/max;\x20(2)\x20switch\x20to\x20a\x20fixed\x20'+'Entity\x20(treasury)\x20recipient\x20—\x20the\x20only\x20exclusive\x20choice\x20on\x20the\x20automatic\x20order_allocators\x20route;\x20'+'(3)\x20drop\x20automatic\x20allocation\x20and\x20pin\x20a\x20per-order\x20Guard\x20(order.owner\x20==\x20constant)\x20for\x20trustless\x20'+'exclusivity.'},'RC-FIND-04':{'title':'Standalone\x20allocation\x20without\x20issuer\x20identity\x20constraint','detail':(a,b)=>'The\x20allocator\x20Guard\x20associated\x20with\x20service\x20'+a+'\x20is\x20in\x20standalone\x20form\x20(no\x20Service/arbitration\x20'+('access-control\x20layer)\x20and\x20binds\x20no\x20Signer\x20identity:\x20anyone\x20can\x20trigger\x20distribution\x20(rule\x20'+b['code']+').'),'suggestion':'Bind\x20the\x20issuer\x20(Signer\x20==\x20owner/admin)\x20or\x20move\x20the\x20allocation\x20into\x20a\x20Service\x20access-control\x20layer.'},'RC-FIND-05':{'title':'Guard\x20uses\x20session-only\x20queries\x20—\x20fails\x20permanently\x20after\x20session\x20migration','detail':(a,b)=>'The\x20order\x20allocator\x20Guard\x20of\x20service\x20'+a+'\x20uses\x20session\x20queries\x20(1270/1271)\x20at\x20'+((b['evidence_paths']['join'](',\x20')||'(root)')+':\x20after\x20the\x20session\x20migrates\x20to\x20history\x20the\x20query\x20aborts\x20')+('(W_FIELD_NOT_FOUND)\x20and\x20the\x20Guard\x20fails\x20permanently\x20—\x20allocation\x20can\x20never\x20trigger\x20(rule\x20'+b['code']+').'),'suggestion':'Require\x20the\x20merchant\x20to\x20switch\x20to\x20progress.current_time\x20(1272)\x20or\x20history\x20queries\x20(1274-1279);\x20'+'session\x20queries\x20deadlock\x20the\x20allocation.'},'RC-FIND-07':{'title':'Submission\x20slot\x20is\x20not\x20address-typed','detail':(a,b)=>'The\x20GuardIdentifier\x20recipient\x20slot\x20of\x20the\x20order\x20allocator\x20Guard\x20of\x20service\x20'+a+'\x20is\x20not\x20Address-typed:\x20'+'allocator_add\x20rejects\x20it\x20(ERECIPIENT_IDENTIFIER_NOT_ADDRESS)\x20and\x20the\x20allocation\x20config\x20is\x20invalid\x20'+('(rule\x20'+b['code']+',\x20evidence\x20paths\x20'+(b['evidence_paths']['join'](',\x20')||'(root)')+').'),'suggestion':'Change\x20the\x20slot\x20value_type\x20to\x20Address,\x20or\x20switch\x20to\x20an\x20Entity\x20recipient.'},'RC-FIND-06':{'title':'Permissionless\x20alloc\x20—\x20settlement\x20timing\x20can\x20be\x20front-run','detail':(a,b)=>'Once\x20the\x20Guard\x20conditions\x20of\x20service\x20'+a+'\x27s\x20allocation\x20hold,\x20anyone\x20can\x20trigger\x20settlement\x20'+'(alloc\x20is\x20permissionless).\x20For\x20Entity/object\x20recipients\x20this\x20affects\x20timing\x20only,\x20not\x20destination\x20'+('(rule\x20'+b['code']+').'),'suggestion':'Watch\x20settlement\x20events;\x20constrain\x20time-sensitive\x20allocations\x20via\x20Guard\x20time\x20conditions.'},'RC-FIND-08':{'title':'Guard\x20relies\x20on\x20sub-guards\x20—\x20their\x20constraints\x20are\x20NOT\x20credited\x20by\x20this\x20audit','detail':(a,b)=>'The\x20allocator\x20Guard\x20of\x20service\x20'+a+'\x20composes\x20'+b['evidence_paths']['length']+'\x20sub-guard(s)\x20via\x20relies\x20'+'(one\x20level,\x20<=4):\x20scope/signer\x20constraints\x20may\x20live\x20in\x20the\x20sub-guards.\x20This\x20audit\x20evaluates\x20only\x20'+'the\x20guard\x27s\x20own\x20expression\x20tree\x20—\x20sub-guard\x20constraints\x20are\x20NOT\x20credited,\x20so\x20scope-binding\x20gaps\x20'+('(RC-FIND-02)\x20may\x20be\x20over-reported\x20and\x20sub-guard-only\x20conditions\x20stay\x20unverified\x20(rule\x20'+b['code']+').'),'suggestion':'Read\x20the\x20relied\x20sub-guards\x27\x20table\x20and\x20root\x20directly\x20on-chain\x20and\x20verify\x20their\x20constraints\x20'+'manually,\x20or\x20re-run\x20with\x20an\x20audit\x20tool\x20that\x20resolves\x20them\x20automatically.'}};function copyFor(a,b){const d=COPY[a['code']];if(d)return{'title':d['title'],'detail':d['detail'](b,a),'suggestion':d['suggestion']};return{'title':'Allocator\x20audit\x20finding\x20'+a['code'],'detail':'Order\x20allocator\x20Guard\x20of\x20service\x20'+b+':\x20'+a['title']+'.\x20'+a['explanation'],'suggestion':a['mitigation']};}function guardDefFromNode(a){const b=a?.['raw'],c=b?.['data']??b;if(!c)return undefined;return{...Array['isArray'](c['table'])?{'table':c['table']}:{},'root':c['root'],...Array['isArray'](c['relies'])?{'relies':c['relies']['filter'](e=>typeof e==='string')}:{},...typeof c['relies_logic_and']==='boolean'?{'relies_logic_and':c['relies_logic_and']}:{}};}export const serviceAllocatorAuditNodeAnalyzer=adaptNodeAnalyzer({'id':SERVICE_ALLOCATOR_AUDIT_NODE_ANALYZER_ID,'kind':'risk','objectType':'Service','inspect'(b,h){const i=b['raw'],j=i?.['data']??i;if(!j)return[];const k=j['order_allocators'],l=Array['isArray'](k?.['allocators'])?k['allocators']:undefined;if(!Array['isArray'](l)||l['length']===0x0)return[];const m=h['visibleEdges']['filter'](w=>w['from']===b['id']&&w['schema']==='service.order_allocator_guard'),n={},o=[];for(const w of m){const x=h['graph']['nodes']['get'](w['to']),y=guardDefFromNode(x);if(y&&typeof y['root']==='object'&&y['root']!==null){n[w['to']]=y;for(const z of y['relies']??[]){const A=z['toLowerCase']();if(n[A])continue;const B=guardDefFromNode(h['graph']['nodes']['get'](A));B&&typeof B['root']==='object'&&B['root']!==null?n[A]=B:o['push'](A+'\x20(guard.relies)');}}else o['push'](w['to']);}const p=[];o['length']>0x0&&p['push']({'severity':'info','title':'Allocator\x20Guard\x20evidence\x20gap:\x20expression\x20tree\x20not\x20fetched\x20—\x20fund-destination\x20audit\x20incomplete','detail':'The\x20allocation\x20template\x20of\x20service\x20'+b['id']+'\x20references\x20'+o['length']+'\x20guard(s)\x20'+('whose\x20table/root\x20were\x20not\x20fetched\x20with\x20the\x20topology\x20('+o['join'](',\x20')+'):\x20fund\x20ownership\x20')+'and\x20condition\x20sufficiency\x20cannot\x20be\x20assessed.','suggestion':'Read\x20these\x20guards\x27\x20table\x20and\x20root\x20directly\x20by\x20address\x20on-chain\x20and\x20re-audit;\x20'+'an\x20evidence\x20gap\x20is\x20not\x20a\x20pass.','roles':[...ROLES_FUND_RISK]});const q=l['map'](C=>C??{})['filter'](C=>typeof C['guard']==='string'&&C['guard'])['map'](C=>({'guard':C['guard']['toLowerCase'](),'sharing':(Array['isArray'](C['sharing'])?C['sharing']:[])['map'](D=>{const E=D??{};return{'who':E['who'],'sharing':E['sharing'],'mode':E['mode']};})}));if(q['length']===0x0)return p;const s=analyzeRecipientConstraints({'trigger_source':'service_order_allocators','host_service':b['id'],'allocators':q,'guards':n});for(const C of s['findings']){const D=copyFor(C,b['id']);p['push']({'severity':severityOf(C),'title':D['title'],'detail':D['detail'],'suggestion':D['suggestion'],'roles':[...ROLES_FUND_RISK]});}const t=new Set();for(const E of s['allocators']){for(const F of E['recipients'])t['add'](F['beneficial_owner']);}const u=!s['safe_destination']?'high':s['resolution_required']?'medium':'info';return p['push']({'severity':u,'title':'Fund\x20destination\x20and\x20condition\x20integrity:\x20'+(''+(s['safe_destination']?'destination\x20safe':'stealable\x20destination\x20exists'))+(''+(s['resolution_required']?'\x20(residual\x20requires\x20explicit\x20decision)':'')),'detail':'Service\x20'+b['id']+'\x20allocation\x20template:\x20'+q['length']+'\x20allocator(s)\x20/\x20'+(Object['keys'](n)['length']+'\x20resolved\x20guard(s).\x20Fund\x20destinations\x20=\x20')+(([...t]['join'](';\x20')||'(no\x20recipients)')+'.\x20')+((s['safe_destination']?'No\x20recipient\x20can\x20be\x20redirected\x20to\x20an\x20arbitrary\x20attacker-controlled\x20address\x20(order\x20escrow\x20'+'is\x20enforced\x20by\x20Sui\x20ownership:\x20only\x20the\x20order\x20owner\x20can\x20extract\x20via\x20owner_receive).':'WARNING:\x20an\x20unbound\x20Signer\x20direct-pay\x20path\x20exists\x20—\x20do\x20not\x20pay\x20before\x20the\x20fix.')+'\x20')+(''+s['summary']),'suggestion':s['resolution_required']?'Before\x20ordering,\x20require\x20the\x20merchant\x20to\x20pick\x20one\x20resolution\x20for\x20the\x20residual\x20(competition\x20'+'declaration\x20+\x20capped\x20exposure\x20/\x20Entity\x20treasury\x20routing\x20/\x20per-order\x20pinned\x20Guards)\x20and\x20confirm\x20'+'it\x20is\x20written\x20in\x20the\x20service\x20description.':s['safe_destination']?'Destination\x20is\x20safe;\x20verify\x20condition\x20sufficiency\x20per\x20the\x20RC\x20audit\x20suggestions\x20before\x20ordering.':'A\x20fund\x20theft\x20path\x20exists:\x20do\x20not\x20pay\x20this\x20service\x20and\x20require\x20the\x20merchant\x20to\x20fix\x20the\x20Guard.','roles':[...ROLES_FUND_RISK]}),p;}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{adaptNodeAnalyzer}from'../graph/onchain/index.js';import{assessServiceStateRisks}from'./service-risk.js';export const SERVICE_RISK_NODE_ANALYZER_ID='SR1';const STAKEHOLDER_ROLE={'owner':'merchant','provider':'merchant','customer':'buyer','arbitrator':'arbitrator','system':'system'},COPY={'R-S-4-05':{'
|
|
1
|
+
import{adaptNodeAnalyzer}from'../graph/onchain/index.js';import{assessServiceStateRisks}from'./service-risk.js';export const SERVICE_RISK_NODE_ANALYZER_ID='SR1';const STAKEHOLDER_ROLE={'owner':'merchant','provider':'merchant','customer':'buyer','arbitrator':'arbitrator','system':'system'},COPY={'R-S-4-05':{'title':()=>'Fulfillment\x20state:\x20Service\x20is\x20paused\x20(bPaused=true);\x20no\x20new\x20orders\x20can\x20be\x20placed\x20while\x20paused','detail':a=>'Shop\x20'+a+'\x20currently\x20has\x20bPaused=true:\x20the\x20merchant\x20paused\x20operations\x20voluntarily;\x20new\x20orders\x20cannot\x20be\x20submitted\x20until\x20it\x20resumes\x20(rule\x20R-S-4-05,\x20evidence\x20bPaused=true).','suggestion':'Ask\x20the\x20merchant\x20via\x20Messenger\x20when\x20operations\x20resume;\x20do\x20not\x20pay\x20for\x20orders\x20while\x20paused.'},'R-S-4-06':{'title':()=>'Fulfillment\x20state:\x20Service\x20is\x20unpublished\x20(draft),\x20invisible\x20to\x20the\x20market\x20and\x20order_new\x20will\x20fail','detail':a=>'Shop\x20'+a+'\x20currently\x20has\x20bPublished=false:\x20the\x20object\x20is\x20still\x20a\x20draft,\x20invisible\x20to\x20the\x20market,\x20and\x20any\x20order\x20attempt\x20fails\x20(rule\x20R-S-4-06,\x20evidence\x20bPublished=false).','suggestion':'Wait\x20for\x20the\x20merchant\x27s\x20official\x20publish\x20(publishing\x20is\x20irreversible\x20and\x20locks\x20the\x20config)\x20before\x20ordering;\x20a\x20draft\x20link\x20is\x20not\x20an\x20on-sale\x20promise.'},'R-S-5-05':{'title':()=>'Missing\x20payout\x20path:\x20compensation_fund\x20has\x20a\x20balance\x20but\x20no\x20Arbitration\x20is\x20bound','detail':(a,b)=>'Shop\x20'+a+'\x20has\x20compensation_fund\x20balance\x20but\x20empty\x20arbitrations:\x20payouts\x20require\x20dispute\x20->\x20ruling\x20->\x20arb_withdraw\x20to\x20claim,\x20'+('and\x20without\x20an\x20arbitration\x20binding\x20this\x20money\x20has\x20no\x20executable\x20claim\x20path\x20(rule\x20R-S-5-05,\x20evidence\x20'+(b['evidence']??'')+').'),'suggestion':'Require\x20the\x20merchant\x20to\x20bind\x20at\x20least\x20one\x20Arbitration\x20in\x20a\x20different\x20group\x20than\x20the\x20shop\x20Permission\x20before\x20ordering;\x20payout\x20promises\x20without\x20a\x20dispute\x20path\x20are\x20unenforceable.'}};export const serviceRiskNodeAnalyzer=adaptNodeAnalyzer({'id':SERVICE_RISK_NODE_ANALYZER_ID,'kind':'risk','objectType':'Service','inspect'(a){const b=a['raw'],c=b?.['data']??b;if(!c)return[];const e={};if(typeof c['bPaused']==='boolean')e['current_bPaused']=c['bPaused'];if(typeof c['bPublished']==='boolean')e['current_bPublished']=c['bPublished'];if(c['compensation_fund']!=null)e['current_compensation_fund_balance']=String(c['compensation_fund']);if(Array['isArray'](c['arbitrations']))e['current_arbitrations_count']=c['arbitrations']['length'];return assessServiceStateRisks(e)['map'](f=>{const g=COPY[f['id']];return{'severity':f['level']==='CRITICAL'||f['level']==='HIGH'?'high':f['level']==='MEDIUM'?'medium':'low','title':g['title'](a['id'],f),'detail':g['detail'](a['id'],f),'suggestion':g['suggestion'],'roles':[...new Set(f['affected_stakeholders']['map'](h=>STAKEHOLDER_ROLE[h]))]};});}});
|