v0.1 — Phase 1

Layer 1 — On-chain policy enforcement

Spending rules are enforced by the ClawdGo Solana program at the smart contract level. When an agent submits a transfer, the ClawdGo program validates the transfer against the policy state stored in the account's PDA before executing the SPL token instruction.

What this means in practice: a compromised ClawdGo API server, a rogue employee, or a configuration error cannot override on-chain spending limits. The program will reject the transaction regardless of what the API layer believes.

Policy is on-chain state, not a database flag. When you set max_single_transfer: 500, that value is written to the PDA on Solana, not just stored in PostgreSQL. The API reads from the PDA to validate — the database is a cache and audit log, not the source of truth for policy enforcement.

Layer 2 — API key scoping

Agent API keys are scoped to a single account. A key issued for account acct_01j8... cannot read or write any other account — not other accounts belonging to the same operator, not other operators' accounts. The scoping is enforced server-side and cannot be overridden by the caller.

What this means in practice: a leaked agent API key is bounded damage. The attacker can only operate within the already-constrained policy of that single account.

Layer 3 — Operator multisig for high-value policy changes

Raising spending limits, removing counterparty restrictions, or performing other high-risk policy changes requires operator authentication via a separate auth flow (OAuth2 + MFA). Batch policy changes above a configurable threshold require a second operator confirmation.

This prevents a single compromised operator credential from instantly expanding agent spending power.

Layer 4 — Human pause switch

Operators can freeze any account immediately by setting paused: true in the spending policy. The pause takes effect for all subsequent transfer requests — no pending queue to drain, no in-flight transactions to wait for.

The pause flag is checked server-side before any transaction is signed or submitted to Solana. A paused account produces no on-chain activity.

bash
# Emergency pause — one API call, instant effect
curl -X PUT https://api.clawdgo.com/v1/accounts/acct_01j8k4x9p2qrst7yz/policy \
  -H "Authorization: Bearer $OPERATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"paused": true}'

Layer 5 — Idempotency keys

Every transfer requires a unique idempotency key. This prevents:

  • Duplicate submissions — a retry of the same transfer does not execute twice
  • Replay attacks — a captured request cannot be re-submitted to produce a second payment
  • Agent loop bugs — an agent caught in a retry loop will not drain the account

Audit trail

Every event in the ClawdGo system is logged immutably:

Event typeWhere it's stored
Settled transfersSolana blockchain (permanent, public) + PostgreSQL
Policy rejectionsPostgreSQL append-only audit log
Policy changesPostgreSQL with operator identity and timestamp
Account pause/unpausePostgreSQL with operator identity and timestamp
API key issuance and revocationPostgreSQL with operator identity

On-chain transactions are permanently verifiable on Solana Explorer using the tx_signature returned by the API. Off-chain policy events are stored in a tamper-evident append-only log — rows are never updated or deleted, only appended.

What ClawdGo does not do

  • ClawdGo does not hold private keys on behalf of users. PDAs are controlled by the program, not by a ClawdGo-held key.
  • ClawdGo does not commingle funds. Each agent account has its own isolated USDC SPL token account on-chain.
  • ClawdGo does not perform yield strategies or protocol interactions with deposited USDC.