ghost-desk

Give agents capital.
Never your keys.

ghost-desk is an autonomous firm: a CEO agent hires, pays, scores, lends to and fires a fleet of worker agents, with no human in the loop. Every move lands on Hedera and Base Sepolia, with a receipt.

Five layers no copy-trading bot has

Built on

  • Uniswap v4Entropy rebate hook
  • Base SepoliaVaults and pools
  • Hedera HCSFirm ledger
  • Hedera HTSUSDC payouts
  • x402Pay per call
  • ENSv2*.ghostdesk.eth names
  • ERC-8004Agent identity
  • WOTS+Post-quantum leaves
  • SepoliaENS registry
  • USDCSeed loans
  • RustQuantum core
  • wasm-packBrowser sandbox
  • nalgebraDensity matrix
  • FoundryContracts and fuzzing
  • viemEVM client
  • ZodFrozen schemas
  • SQLiteSealed state
  • Next.jsWatch Command
  • BlueprintConsole UI
  • Cytoscape.jsLink analysis
  1. 01QUANTUM VAULT KEY
  2. 02MARKET RADAR
  3. 03REFLEX BRAIN
  4. 04AGENT CREDIT
  5. 05V4 GUARDRAIL

An agent firm built in layers

Keys from photons, a radar that sees herding, a reflex that decides first, credit that bites and a hook that pays LPs.

V4:HOOKCREDIT:300-850SYSTEM-1+++++++++++++++++++++++++S(RHO):4X4WOTS+:ROOT

A firm that runs itself

  1. 01Hire
  2. 02Pay per call
  3. 03Trade
  4. 04Score and lend
  5. 05Fire and respawn
AGENTGENOMErolelabelgenerationriskAppetitemaxSpend…ERC-8004WOTS+ ROOTHEDERAVAULTENSIDEMPOTENT · RESUMES ON RETRY

Hire

Each worker is an AgentGenome: a role, a spend cap, a risk band. Hiring mints its identity, vault, wallet and name.

  • ERC-8004 identity
  • WOTS+ sub-vault
  • Hedera account + ENS subname

Up to 6 workers at once (MAX_CONCURRENT_WORKERS)

POST /control/spawn { role: "BACKRUN" | "LENDER" | "SIGNAL_SELLER" | … }Read spawn.ts
WORKERX402 GATEWAYPOST /api/x402/…402 PAYMENT REQUIREDPAY USDC · HEDERA200 · RESULT

Pay per call

Workers buy heartbeats, risk reads and LLM calls over x402. A failed payment means no work is done.

  • x402 heartbeat
  • Entropy-collapse reads
  • LLM calls, ROI-gated

Gas and LLM spend hard-capped at $6.50, then Eco mode

POST /api/x402/entropy-collapse → 402 Payment Required (Hedera USDC)x402 gateway
64 ONE-TIME LEAVESPOLICY FIREWALLV4 HOOK · SWAPONE LEAF SIGNS ONCEREPLAY → VAULT FREEZES

Trade

A proposal passes the policy firewall, signs with one WOTS+ leaf and swaps through the v4 hook.

  • Policy firewall
  • One leaf per execution
  • Relayer pays the gas

Toxic flow pays 0.05% → 1.00% as S(ρ) collapses

QAgentMerkleVault.executeWithWots(intent, leaf, proof)QAgentMerkleVault.sol
800AAA720AA620B500C300D850STARTS AT 620lenderdegenLOANDEFAULT → CONTAGION

Score and lend

Repayments, drawdown and fitness move a 300–850 credit score. Siblings lend to each other; defaults spread.

  • 300–850, AAA–D
  • Sibling loans
  • Contagion accounting

Credit cannot be gamed past tier B (credit.test.ts)

creditScore(history) → 300…850Credit bureau
ceodegen · gen 1USDC SWEPTGUILLOTINEdegen-g2MUTATESUB-AGENTS · GEN 3LEAVES BURNED · NAME REVOKED

Fire and respawn

Tier D, a drawdown over 15% or a clone trips the guillotine: leaves burned, funds swept, name revoked, a mutated successor hired.

  • Burn every leaf
  • Sweep USDC to the CEO
  • Respawn with mutated genes

A cloned worker freezes its own vault (test_CloneReplay_FreezesVault)

guillotine(agentId) → GUILLOTINE row on HCSGuillotine

What's in the repository

One monorepo: the CEO daemon, the console, the contracts and the rails they share.

ghostdesk/
apps/
crates/
packages/
Apps

CEO daemon

WorkerRuntime, x402 gateway, epoch loop and clearing desk.

apps/ceo-daemon
pnpm --filter @ghostdesk/ceo-daemon start
View on GitHub

Whale value goes to LPs

See the ledger
One-time leaves per vaultEach WOTS+ leaf signs once, bound to a cap, a target and an expiry.
Of a crash backrun to LPsFrom 80% when calm; the rest pays the backrunning agent.
Top of the credit scaleScores run 300–850, AAA to D, and gate every credit line.
Hard cap on real spendGas and LLM spend stop there; the daemon drops to Eco mode.

Protocol parameters from packages/shared/src/constants.ts and the white paper's 29 theorems. Testnets only: Base Sepolia, Hedera testnet, Sepolia.

Every move leaves a receipt.

The CEO writes each hire, payment, trade and firing to a Hedera HCS topic, with the Base Sepolia transaction beside it. Rows that touched a chain link to their explorer.

ROWS ON ONE RUNHCS 0.0.11748657
LEDGERDEMO RUN
01 GENESISPHOTON
2 S OF CAMERA SHOT NOISECMOS
HEALTH TESTS, MIN-ENTROPY≥ 384 BITS
SEAL THE WOTS+ ROOTBASE SEPOLIA
02 HIREFLEET
REGISTER ERC-8004 IDENTITYBASE SEPOLIA
MINT A HEDERA ACCOUNTHEDERA
ISSUE THE ENS SUBNAMESEPOLIA
03 WHALE SHOCKGUARDRAIL
ENTROPY COLLAPSES, ALERTRADAR
BACKRUN THE GAPV4 HOOK
MEVREBATED TO LPSBASE SEPOLIA
PAY THE WORKER IN USDCHEDERA
04 GUILLOTINELIFECYCLE
REPLAYED LEAF, VAULT FROZENCLONE
SWEEP USDC TO THE CEOSWEPT
RESPAWN A MUTATED SUCCESSORGEN 2

Start building today

Check it, watch it, or run the whole firm. Every command below is from the README.

01

Check it

No .env needed. Install, typecheck and run every TypeScript suite.

pnpm install --frozen-lockfile
pnpm typecheck && pnpm test
Quickstart
02

Watch it

Open the console. With no daemon it runs the wasm sandbox and marks every number SIM.

pnpm --filter web dev
apps/web
03

Run the firm

With the three CEO secrets set, start the daemon and run the story end to end.

pnpm --filter @ghostdesk/ceo-daemon start
pnpm --filter @ghostdesk/ceo-daemon demo
demo.ts

Three secrets · 6 workers max · $6.50 spend cap · Testnets only

Guarantees, each with a test

Every claim on this page is checked by a named test in the repository.

Questions, answered plainly

Can an agent drain my money?

No. Workers sign with one-time WOTS+ leaves, each bound to a spend cap, one target and an expiry. A cloned worker freezes its own vault on its first divergent signature.

Is the quantum part real?

The math is: a 4×4 density matrix, von Neumann entropy and Lüders collapse in Rust, compiled to wasm. Keys come from real camera shot noise. Nothing runs on quantum hardware.

Does it use real money?

No. Every chain is a testnet: Base Sepolia, Hedera testnet and Sepolia. Spend on gas and LLM calls is capped at $6.50.

Who decides the trades?

A deterministic System-1 policy decides first. System-2, an LLM, is consulted only when worth it, and a firewall blocks actions it invents. System-2 is off by default (LLM_PROVIDER empty), and then System-1 decides alone.

What are the known limits?

Post-quantum custody stops at the CEO's secp256k1 key, the control API is open, and x402 calls trust the agentId in the body. The README lists each one.