Documentation · Base

Protect Solana agents with verified onchain guardrails.

Oculus watches autonomous wallets on Solana in real time, verifies every spend against your policy on-chain, and pushes structured alerts the moment a limit is crossed — without forcing you to rewrite your agent stack.

Introduction

Autonomous agents move fast on Solana: they swap, bridge, pay invoices, top up tooling, and execute workflows around the clock. The problem is not activity, it is unchecked activity. One bad loop or compromised tool permission can turn a healthy treasury into a live incident.

Oculus sits alongside your Solana wallet operations and enforces the guardrails you define: per-transaction limits, rolling budget windows, recipient and program allowlists, and structured webhook alerts on every breach.

Status: Oculus is live for Solana mainnet monitoring with wallet tracking, Helius event ingestion, on-chain policy checks, and real-time alert delivery.

Quickstart

Most teams are live in under ten minutes. You need a Solana treasury wallet and access to a webhook endpoint or the SDK to receive alerts.

  1. Create a workspace

    Open your Oculus workspace, register the agent, and connect the Solana wallet that funds its transactions.

  2. Define policy guardrails

    Set hard caps for per-transaction, hourly, and daily spend. Add allowlists for approved programs, tokens, and recipient wallets.

  3. Fund your reserve

    Point Oculus at the agent wallet(s) you want to watch. Every transfer, swap, and program interaction is streamed into the policy engine.

  4. Attach monitoring

    Connect your webhook endpoint so every Solana transfer, swap, and program interaction gets logged in real time against the active policy.

  5. Start routing agent activity

    Use the SDK, API, or CLI to register agents under a policy. From there Oculus handles on-chain verification and alert routing.

Enforcement flow

Oculus is designed to be operational, not ceremonial. Each spend event runs through the same pipeline so your team can trace what happened and why.

1. Observe

Helius webhooks and policy-linked transaction streams detect wallet activity on Solana within seconds.

2. Verify

Each transfer is compared against active rules: amount, contract, destination, category, and cumulative budget usage.

3. Decide

Oculus marks the event as compliant, soft-breach, or hard-breach and pushes that decision to your alerting stack in real time.

4. Respond

Approved claim amounts are paid from your reserve in USDC and written to the workspace ledger for auditability.

Policies

A policy is a signed configuration that tells Oculus how an agent is allowed to spend on Solana. It stays consistent whether the agent acts through a backend service, a cron job, or an internal operator tool.

{
  "workspace_id": "ws_base_01",
  "agent_id": "ag_marketmaker_7",
  "chain": "base-mainnet",
  "wallet": "0x8A13...D4c1",
  "limits": {
    "per_tx_usd": 150,
    "per_hour_usd": 1200,
    "per_day_usd": 6000
  },
  "allowed_contracts": [
    "0xContractRouterA",
    "0xApprovedVendorB"
  ],
  "alert_channel": "webhook://ops.example.com/oculus",
  "reserve_asset": "USDC",
  "alert_channel": "ops-wallet-alerts"
}

Spending limits

Limits are denominated in USD and evaluated at the time of verification so the same policy works across volatile onchain activity.

Incidents

Incidents are created when a verified spend breaches an active policy. Oculus records the triggering transfer, the policy snapshot at the moment of the breach, the calculated breach amount, and the routing decision (which channels were notified).

Every incident is written to your workspace as a structured record: triggering transfer, policy snapshot at breach time, breach amount, and the alert channels notified. Incidents can be queried via API, streamed via webhook, or exported for treasury reconciliation.

TypeScript SDK

The SDK helps you register Solana activity, validate policies, and attach agent metadata from your application layer without building your own control plane.

// npm install @oculus/sdk viem
import { createPolicyClient } from "@oculus/sdk";
import { createWalletClient, http } from "viem";
import { base } from "viem/chains";

const wallet = createWalletClient({
  chain: base,
  transport: http(process.env.BASE_RPC_URL)
});

const policyClient = createPolicyClient({
  apiKey: process.env.BASEBOT_API_KEY,
  workspaceId: "ws_base_01",
  agentId: "ag_marketmaker_7",
  walletClient: wallet
});

const result = await policyClient.verifyAndRecord({
  category: "vendor_payment",
  expectedUsd: 72.4,
  recipient: "0xApprovedVendorB"
});

Webhooks

Webhook delivery is the fastest way to pipe Oculus decisions into Slack, email, your incident system, or another internal agent supervisor. Events are signed with X-Oculus-Signature.

EventTriggered when
tx.observedA Solana transfer or program interaction is detected
limit.hitA hard or soft policy threshold is crossed
incident.createdA policy breach is recorded
policy.breachA wallet crossed a policy limit
policy.updatedGuardrails or reserve settings changed
POST /your-webhook HTTP/1.1
X-Oculus-Signature: t=1779296400,v1=3b52...

{
  "event": "claim.created",
  "agent_id": "ag_marketmaker_7",
  "tx_hash": "0xf5d9...eb42",
  "breach_type": "per_day_usd_exceeded",
  "claim_amount_usd": 214.90,
  "reserve_asset": "USDC"
}

CLI

The CLI is useful for provisioning workspaces, applying policies from JSON, backfilling Solana activity, or inspecting active claims from ops terminals.

# install
npm install -g @oculus/cli

# authenticate
oculus login

# apply a policy file
oculus policy apply ./policy.base.json

# replay the last hour of Solana activity
oculus events sync --agent ag_marketmaker_7 --since 1h

# inspect open claims
oculus claims list --status open

REST API

Base URL: https://api.basewire.app/v1. Every request is authenticated with a workspace-scoped bearer token issued from Settings → API keys.

MethodPathPurpose
POST/policiesCreate or activate a policy
GET/policies/:idRead the current policy snapshot
PATCH/policies/:idUpdate limits, reserve, or allowlists
GET/eventsPaginated Solana activity timeline
GET/claimsOpen and historical claim records
POST/verifyEvaluate an expected Solana spend before execution

Errors

The API returns JSON with code, message, and optional details. These are the cases you will hit most often in Base-only setups.

CodeMeaning
400Malformed policy payload or unsupported Solana address format
401Missing or invalid workspace token
403Contract or recipient not permitted by the active policy
409Conflicting policy or duplicate reserve configuration
422Reserve is too low for requested monitoring
429Rate limited — reduce verification burst size
5xxTransient platform error — retry with backoff and preserve idempotency keys

FAQ

Does Oculus custody my treasury?

No. Your Solana wallet remains under your control. Oculus observes activity, evaluates it against policy, and automates claims from your configured reserve.

Which chain does this cover?

This documentation and product flow are Solana-only. Policies, incident tracking, and alert routing are designed for Solana mainnet operations.

Do I need a platform token?

No. There is no staking requirement in this flow. Teams fund incident records directly from a USDC reserve tied to the workspace.

Can I run monitor-only mode?

Yes. You can observe Solana activity, receive alerts, and build audit trails without wiring the SDK into your agent runtime.

How are claims verified?

Claims are verified from Solana transaction receipts, policy snapshots, event timing, and the reserve settings active when the incident occurred.

What if my monitoring provider misses an event?

Oculus supports replay and backfill flows so you can re-sync the affected time window and reconstruct the claim timeline.

Need help? Reach the ops team at support@worldcuplab.xyz or wire Oculus webhooks into your incident room and keep the whole team in sync.