Repository navigation
feat: per-model legion bundles + generators + deploy/register plans - #6
Merged
Merged
Conversation
Seven per-model legions, each its own governed commons (treasury + fees +
gov), all deployed under ONE wallet with family-suffixed contract names
(legion-{treasury,fees,gov}-<family>). Members stake -> propose -> vote on
that model's treasury; 10k min stake, 10% exit fee (rest refundable). The
inference gateway routes each model's 8% skim to its own treasury.
- contracts/model-base/: the generic base (treasury + fees + a GENERIC gov,
news Rail-A guardrails stripped, with 10k min-stake + 10% exit-fee).
- contracts/models/: 21 generated contracts (treasury/fees/gov x 7 families:
qwen, deepseek, glm5, kimi, llama4, mistral, gemma4). clarinet check ✔.
- scripts/gen-model-legions.sh: generate the bundles from model-base (sed
rewrites .legion-treasury -> .legion-treasury-<family>; mainnet-flippable
via SIP010_TRAIT / SBTC_TOKEN env).
- scripts/gen-model-deploy-plan.sh + deployments/models.testnet-plan.yaml:
publish + wire all 7 (per model: treasury -> fees -> gov, then set-token +
set-gov).
- scripts/gen-register-plan.sh + deployments/register.testnet-plan.yaml:
register all 7 in legion-registry.
- deployments/engage.testnet-plan.yaml: engagement-stake deploy plan.
- Clarinet.models.toml: manifest for the 21 contracts.
Deployed + registered + proven on testnet: a paid qwen call routed its 8%
into legion-treasury-qwen, isolated from the other models.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seven per-model legions, each its own governed commons (treasury + fees + gov), all under one wallet with family-suffixed contract names (
legion-{treasury,fees,gov}-<family>). Members stake → propose → vote on that model's treasury (10k min stake, 10% exit fee, rest refundable). The inference gateway routes each model's 8% skim to its own treasury.Contents
contracts/model-base/— generic base: treasury + fees + a generic gov (news Rail-A guardrails stripped; 10k min-stake + 10% exit-fee added).contracts/models/— 21 generated contracts (treasury/fees/gov × 7 families: qwen, deepseek, glm5, kimi, llama4, mistral, gemma4).clarinet check✔.scripts/gen-model-legions.sh— generate bundles frommodel-base(mainnet-flippable viaSIP010_TRAIT/SBTC_TOKEN).scripts/gen-model-deploy-plan.sh+deployments/models.testnet-plan.yaml— publish + wire all 7.scripts/gen-register-plan.sh+deployments/register.testnet-plan.yaml— register all 7 inlegion-registry.deployments/engage.testnet-plan.yaml,Clarinet.models.toml— engage-stake plan + manifest.Proven on testnet
All 21 deployed + wired, all 7 registered (registry ids 3–9), and a real paid qwen call routed its 8% into
legion-treasury-qwen(8000 → 8100), isolated from the other models.