Chio/Docs

EconomyFoundations

The Economic Stack

Chio's cross-organization economy uses dedicated Rust crates with defined types, dependencies, and trust boundaries.

The Map

Ten crates carry the dedicated economy responsibilities. Six more are supporting crates that the economy crates depend on for identity, oracles, anchoring, and discovery.

rendering…
Economy crate dependency map. Solid arrows are crate-level Cargo dependencies (A --> B means A depends on B). Labeled arrows show runtime record flows.

Separate crates in one workspace

Every crate ships from the same workspace, but each has its own Cargo.toml and a narrow public API. A different oracle backend or settlement implementation can replace its crate dependency without editing the kernel.

Dedicated Economy Crates

Each crate has one primary responsibility.

CratePurposeKey typesDepends on
chio-manifestSigned tool manifest format with pricing and SLA hints.ToolManifest, ToolDefinition, ToolPricing, PricingModel, SignedManifestchio-core
chio-meteringPer-receipt cost attribution, cumulative cost queries, monetary budget enforcement with cross-currency conversion through the chio-link oracle, billing-export records, and hierarchical budget governance.CostDimension, CostMetadata, BillingExport, BudgetEnforcer, BudgetTreechio-core
chio-reputationDeterministic local reputation scoring from a caller-provided corpus of receipts, capability lineage, and budget records. Pure and storage-agnostic; does not depend on the kernel.LocalReputationCorpus, LocalReputationScorecard, ReputationWeights, ImportedReputationSignalchio-core-types
chio-appraisalRuntime-attestation appraisal and the deterministic marketplace invocation-pricing model, including reputation-tier discounts applied on top of advertised tool pricing. Underwriting, credit, and market build on it.RuntimeAttestationAppraisalResult, MarketplaceReputationTier, MarketplaceBasePrice, MarketplaceInvocationPrice, MarketplacePricingContextchio-core-types
chio-underwritingRisk classification, premium pricing, and decision outcomes for governed actions. Produces decision artifacts and appeal lifecycle records.UnderwritingRiskClass, UnderwritingDecisionPolicy, UnderwritingDecisionOutcome, UnderwritingPremiumQuote, UnderwritingDecisionArtifactchio-core-types, chio-appraisal
chio-creditCredit facilities, bonds, capital book, exposure ledger, and credit scorecards. The accounting layer for delegated risk.CreditFacilityArtifact, CreditBondArtifact, CreditScorecardReport, ExposureLedgerReport, CreditLossLifecycleArtifactchio-core-types, chio-underwriting, chio-appraisal
chio-marketLiability market: provider catalog, quote and bind flow, pricing-authority envelopes, claim packages, and adjudication.LiabilityProviderArtifact, LiabilityQuoteRequestArtifact, LiabilityQuoteResponseArtifact, LiabilityBoundCoverageArtifact, LiabilityClaimAdjudicationArtifactchio-core-types, chio-appraisal, chio-credit, chio-underwriting
chio-federationBilateral peer pinning, federation activation exchange, cross-org reputation clearing, and qualification matrices.FederationActivationExchangeArtifact, FederationQuorumReport, FederationAntiEclipsePolicy, FederatedReputationClearingArtifactchio-core-types, chio-listing, chio-open-market
chio-settleSettlement runtime over the web3 contract family: EVM escrow, Solana settlement, Chainlink CCIP cross-chain messages, x402 / Circle nanopayments / ERC-4337 helpers, and watchdog automation.SettlementCommitment, PreparedEvmCall, CcipSettlementMessage, PreparedSolanaSettlement, X402PaymentRequirements, SettlementWatchdogJobchio-core, chio-credit, chio-anchor, chio-link, chio-kernel
chio-autonomyBounded autonomous pricing, capital-pool optimization, and fail-safe execution automation. Each decision carries explicit references to the signed records it acts on instead of replacing them.AutonomousPricingInputArtifact, AutonomousPricingAuthorityEnvelopeArtifact, AutonomousPricingDecisionArtifact, CapitalPoolOptimizationArtifact, AutonomousExecutionDecisionArtifact, AutonomousRollbackPlanArtifactchio-core-types, chio-market, chio-web3

The settlement and market layer has grown three receivable-side primitives, all landing in chio-credit rather than a new crate: obligation atoms and factoring (chio_credit::obligation and chio_credit::factor), a clearinghouse netting round (chio_credit::clearing::compute_netting_round), and streaming payment channels over a single ChioEscrow deposit. The invariant that makes them safe to compose is one immutable obligation atom per unit of value, so no second economic claim can be minted for the same value.

chio-metering ships two budget layers that coexist. BudgetEnforcer is the flat per-grant enforcer scoped by session, agent, or tool. BudgetTree is the entry point to hierarchical governance: it models organizational structure (organization → department → team → agent) where every node carries its own caps and window and draft spend is checked against every ancestor. The tree does not replace the enforcer; the enforcer stays per-grant while the tree renders a fail-closed BudgetDecision from a caller-supplied SpendSnapshot. Both are storage-agnostic.

Where new responsibilities go

New economic types should land in the crate that already owns the closest type. Put a new credit instrument in chio-credit, a new coverage class in chio-market, a new oracle backend in chio-link. The kernel does not grow.

Supporting Crates

Six crates provide identity, discovery, oracle, and anchoring types that the dedicated economy crates compose.

  • chio-did: self-certifying did:chio identifiers and DID Document resolution. Method-specific identifier is the hex form of an Ed25519 public key. Types: DidChio.
  • chio-credentials: Agent Passport verification. Native canonical-JSON-signed bundle with an OID4VCI projection derived from the native record. Types: AgentPassport, PortableReputationCredential, CertificationCredential.
  • chio-link: oracle integration for cross-currency conversion (Chainlink, Pyth), sequencer health, circuit breakers. Produces canonical OracleConversionEvidence. Types: ChioLinkOracle, ExchangeRate.
  • chio-anchor: checkpoint anchoring over EVM root-registry, Bitcoin super-root with OpenTimestamps, Solana memos, and multi-lane proof bundle verification.
  • chio-listing: generic registry namespace, listing, and trust-activation records with search and admissibility APIs. Types: Listing, SignedListingPricingHint, ListingSearchResponse.
  • chio-open-market: bidding and ask-response API built on the listing registry and governance charters. Types: SignedBidRequest, SignedAskResponse, SignedAcceptedBid.

Where Each Layer Talks to the Kernel

The kernel signs receipts. Every economy crate either hands the kernel something to admit or consumes the receipts it emits.

LayerEntry / exit
IdentityPassport presented at session establishment; receipt records the identity binding.
ManifestKernel verifies SignedManifest before tools admitted; admission feeds the guard pipeline.
MeteringTool reports ToolInvocationCost; cost lands in FinancialReceiptMetadata.
UnderwritingPre-action policy on UnderwritingPolicyInput; decision record attaches as evidence; premium feeds the market.
CreditFacilities and bonds referenced from capability tokens; receipts feed exposure ledger and capital book.
MarketQuote and coverage referenced from the governed intent; claims and adjudication cite receipt evidence.
FederationActivation exchange pinned by the kernel's trust store; bilateral receipts share an intent hash across two kernels.
SettleCapital instructions consumed; observed state projects back as SettlementCommitment updates to receipt settlement_status.
ReputationCaller assembles a LocalReputationCorpus from receipts; score feeds underwriting and credential issuance.

The kernel signs receipts

Economy crates produce signed manifests, listings, passports, and decisions, but the kernel alone signs receipts. Those records provide the references used by other economy records.

Trust Boundaries

Not every crate is inside the trusted computing base. The kernel and a small set of supporting libraries are. The rest are operator-replaceable.

Inside the TCB

  • chio-kernel: the only component that signs receipts and runs the guard pipeline.
  • chio-core and chio-core-types: canonical JSON, crypto primitives, and the receipt and capability types every other crate consumes.
  • chio-manifest: the kernel relies on its signature verification to admit tool servers.
  • chio-metering: cost metadata flows through here on the way into signed receipts.

Operator-replaceable

  • chio-link, chio-anchor, chio-settle: oracle, anchoring, and settlement adapters. Operators pick the backend; the kernel verifies embedded evidence instead of trusting the implementation.
  • chio-appraisal, chio-underwriting, chio-credit, chio-market, chio-autonomy: pricing, policy, instruments, coverage products, and bounded automation. Replace the operator's book without touching the kernel.
  • chio-federation, chio-listing, chio-open-market: bilateral policy, discovery, bidding. The kernel recognizes the record schemas; a buyer can skip them.
  • chio-reputation, chio-credentials: deterministic scoring and passport issuance. These crates are outside the TCB.

What you cannot replace

You cannot replace the kernel without re-deriving every receipt and capability invariant. You cannot replace the canonical JSON encoding without breaking signatures. You cannot replace the receipt schema without breaking every audit consumer. Treat the TCB list above as the floor.

Reading Order by Use Case

The crates compose, but you do not need to read them in dependency order. Pick by what you are building.


Version and Stability

The economy crates ship from the same workspace as chio-kernel and follow the same release rhythm. Schema identifiers are versioned per record type. A few examples from the source:

chio-credit/src/lib.rs
pub const EXPOSURE_LEDGER_SCHEMA: &str = "chio.credit.exposure-ledger.v1";
pub const CREDIT_SCORECARD_SCHEMA: &str = "chio.credit.scorecard.v1";
pub const CREDIT_FACILITY_REPORT_SCHEMA: &str = "chio.credit.facility-report.v1";
pub const CREDIT_BOND_REPORT_SCHEMA: &str = "chio.credit.bond-report.v1";
pub const CAPITAL_BOOK_REPORT_SCHEMA: &str = "chio.credit.capital-book.v1";
chio-manifest/src/lib.rs
pub const TOOL_MANIFEST_SCHEMA: &str = "chio.manifest.v1";

Schema strings are stable identifiers. A bump from v1 to v2 means a breaking change. Each signed record carries its schema identifier so consumers can refuse versions they do not recognize.

Where to look next

The Worked Example page traces one procurement transaction through these crates, citing each crate where it acts.