Follow how Janus protects your capital when an AI agent executes real financial operations, crashes midway, and safely resumes.
Lock spending to a single task instead of an open-ended wallet
Giving an autonomous agent a corporate card or private key invites runaway costs. Janus deposits capital into an onchain Hedera treasury contract with an immutable cap. The agent can spend within its allocation—and not a single cent more.
When an autonomous worker times out after payment, Janus increments the onchain epoch. The old worker is immediately fenced from new commitments, while the replacement worker recovers previously paid deliverables without paying twice.
Watch continuous settlement verifications and real-time state projections. The accounting oracle continuously matches chain state against the independent reference model.
Available, reserved, spent, released-to-reserve and withdrawn are distinct physical balances. Cancellation never refunds settled purchases or invalidates existing reservations.
In-flight commitments survive task cancellation and worker transitions until expiry or merchant settlement.
Unknown payment outcomes require onchain receipt verification before retrying to prevent double debiting.
Incrementing the epoch fencing counter invalidates signatures from disconnected workers immediately.
Cap = Available + Reserved + Spent + Released. Derived balances conform to the independent reference oracle.
Click each slot in the envelope below to inspect how task isolation, operation uniqueness, and attempt replay protection are packed into 96 contiguous bytes.
Merchant issues a cryptographically signed quote pinning price, expiration timestamp, and deliverable schema.
Worker signs the structured 96-byte envelope binding spending directly to the active task ID and current epoch.
Smart contract verifies worker authorization, decrements reservation, transfers funds, and commits settlement intent.
Deliverables are fsynced to disk. If connection drops after payment, replacement worker recovers output without repayment.
// Slot 1: Task ID (0..32 bytes)
// Prevents cross-task contamination.
// Spending is strictly scoped to:
bytes32 taskId = 0x4a9b23f81e04c81099fecb894103194a; // Cap: 100 USDCOwns Next.js 16 app router, Privy authentication identity plumbing, Apple glass dashboard, and live telemetry projections.
Owns HTTP merchant/facilitator, Hedera utilities, fsynced result cache, checkpoint runner, and fail-closed signer locks.
Owns Phase-0 bounded payment probe and Phase-1 multi-task treasury contracts, isolated test suites, and compiler scripts.
Common context across modules: Hedera network config, canonical 96-byte wire rules, versioned ABI, and accounting oracle.
Your identity connects you to the workspace; your wallet remains the root of onchain authority. If Janus servers disappear, capital recovery executes directly through smart contract calls.
The CLI in contracts/phase1/scripts/recover.mjs and static recovery browser bundle in contracts/phase1/artifacts/recovery-browser/ verify deployment identity, chain RPC, and token contract directly with your wallet.
All contract scenarios, accounting invariants, merchant HTTP adapters, and recovery paths are verified locally with reproducible differential traces.
Bounded spend approvals, owner recovery without middleware, and restricted single-payer authorization in Solidity.
Isolated task caps, reservation management, single settlement invariant, and epoch worker fencing.
Canonical wire serialization, merchant quote validation, fsynced result store, and restart resilience.
100 fixed-seed differential traces verifying mathematical conservation of available, reserved, and spent units.
2-block confirmation depth, 500k gas ceiling, cached receipt reconciliation, and 20,000 USDC testnet proof.
Local 4-task runner with deterministic worker crash, epoch handoff, and zero double-charge result reuse.