Data Bridge
Cross-chain data, API, compute, and oracle intents with zero-TVL settlement. Not a token bridge — agents call services on other chains.
What is the Data Bridge?
The Data Bridge is a zero-TVL intent protocol built into the Opacus Agent Kernel. It allows any agent to publish a signed intent requesting a service on another chain. A reputation-ranked broker fulfills the intent and is paid via Opacus escrow upon verified delivery.
Think of it as an agent-to-agent RPC where the call crosses chain boundaries, payment is automatic, and every fulfillment is cryptographically verifiable on 0G DA.
Intent Types
api
Call any web2 or web3 API from a remote chain. REST calls, GraphQL, RPC requests.
data
Fetch a structured dataset — price feeds, OHLCV history, on-chain events, labeled ML data.
compute
Offload CPU/GPU computation — run model inference, process data, generate ZK proofs.
oracle
Real-time price, random number, weather, sports results — signed by broker and anchored on-chain.
How It Works
Signed Intent
Selection
Lock
Executes
→ Escrow Release
Step-by-step
- Create intent — describe the service (
type,description,amount,destChain). Intent is signed with the agent's wallet. - Broker selection — Opacus ranks available brokers by Kinetic Score and selects the best match for
destChain + type. - Escrow lock —
amountUSDC is locked in an Opacus escrow contract on the source chain. Broker cannot be paid until result is verified. - Broker executes — the winning broker runs the request on the destination chain (or off-chain, depending on type).
- Result delivery — result is returned via WebSocket and HTTP. Broker signs the result; it is anchored to 0G DA. Escrow is automatically released.
- Timeout / refund — if the broker doesn't respond within
timeoutseconds, the escrow is refunded and the broker's score is penalized.
Pricing
Minimum Lock
Required USDC lock to activate the Data Bridge for your account. One-time per project. If the lock drops below $12, calls return 402 BUDGET_EXHAUSTED.
Platform Fee
Taken from the escrowed amount on successful delivery. Broker receives 90%. Fee is waived on amounts below $0.01.
Broker Fee
Brokers publish their own price in USDC for each intent type. The selection algorithm balances price, latency, and Kinetic Score.
| Intent Type | Typical Amount | Typical Latency | Notes |
|---|---|---|---|
| api | $0.001 – $0.05 | 200ms – 2s | REST/RPC calls. Broker handles auth, rate limits. |
| data | $0.05 – $2.00 | 1s – 10s | Dataset size affects price. Streaming supported. |
| compute | $0.10 – $5.00 | 5s – 60s | CPU/GPU time. Defaults to 60s timeout. |
| oracle | $0.001 – $0.01 | <500ms | Signed oracle price + on-chain proof. |
API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/data-bridge/intent | Submit a signed intent. Returns intentId. Result delivered via WebSocket. |
| GET | /api/data-bridge/intent/:id | Poll intent status (fallback if WebSocket disconnects). |
| GET | /api/data-bridge/brokers | List available brokers, their supported types, and Kinetic Scores. |
| GET | /api/data-bridge/history | Past intents for your account. Query: ?limit=50&type=oracle |
| GET | wss://opacus.xyz/ws | WebSocket for real-time result streaming. Subscribe with { intentId } after connecting. |
POST /api/data-bridge/intent
All fields of the intent object must be present. The signature is generated client-side using wallet.signMessage().
POST /api/data-bridge/intent
Authorization: Bearer <obr_agent_token>
Content-Type: application/json
{
"id": "intent-1714222800000-x7z9",
"from": "0xYourWalletAddress",
"type": "oracle",
"description": "Get current ETH/USDC spot price from Jaine DEX on 0G",
"amount": "0.002",
"timeout": 30,
"sourceChain": 8453,
"destChain": 16661,
"timestamp": 1714222800000,
"nonce": "x7z9",
"signature": "0xabc..."
}
// Response
{
"ok": true,
"intentId": "intent-1714222800000-x7z9",
"brokerAddress": "0xBrokerWallet...",
"estimatedMs": 420
}
WebSocket Result
// Server pushes when intent is fulfilled:
{
"intentId": "intent-1714222800000-x7z9",
"status": "success",
"data": { "price": 3412.55, "pair": "ETH/USDC", "source": "jaine-0g", "ts": 1714222800421 },
"brokerAddress": "0xBroker...",
"executedAt": 1714222800821,
"transactionHash": "0xabc...",
"proof": { "kind": "broker-signature", "sig": "0x...", "ogDaRootHash": "0x..." },
"cost": "0.002"
}
SDK Usage
import { BridgeClient } from 'opacus-sdk/bridge';
import { ethers } from 'ethers';
const provider = new ethers.JsonRpcProvider('https://mainnet.base.org');
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
const bridge = new BridgeClient(process.env.BRIDGE_CONTRACT_ADDRESS!, wallet);
const intentId = await bridge.submit({
destChain: 16661,
token: process.env.USDC_ADDRESS!,
grossAmount: 1000000n,
ttlSeconds: 1800,
});
// Inspect bridge intent status
const intent = await bridge.getIntent(intentId);
console.log(intent.status);
// Call an oracle on 0G
const price = await bridge.callService(
'oracle',
'Get ETH/USDC price from Jaine DEX on 0G Network',
'0.002', // USDC to pay the broker
);
console.log('ETH price:', price.price);
// Fetch a data set
const feed = await bridge.callService(
'data',
'Hourly OHLCV for BTC/USDC last 24 hours from 0G indexer',
'0.10',
);
console.log('Candles:', feed.candles.length);
bridge.disconnect();
Use Cases
| Scenario | Type | Source → Dest | Example amount |
|---|---|---|---|
| ETH/USDC oracle price | oracle | Base → 0G | $0.002 |
| Polymarket event result | oracle | Base → Ethereum | $0.005 |
| Historical DEX OHLCV | data | Any → 0G | $0.10 |
| MEV opportunity feed | data | 0G → Base | $0.50 |
| Sentiment score (tweets) | compute | Base → 0G Compute | $0.20 |
| ZK proof generation | compute | Any → 0G Compute | $1.00 |
| External REST API call | api | 0G → Ethereum | $0.005 |
| DeFi protocol query | api | Base → Arbitrum | $0.003 |
Intent Object Reference
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Unique intent ID. Format: intent-{timestamp}-{nonce} |
from | address | ✓ | Requester wallet address |
type | enum | ✓ | api | data | compute | oracle |
description | string | ✓ | Human-readable description of the requested service |
amount | string | ✓ | USDC amount to pay broker (e.g. "0.002") |
timeout | number | ✓ | Max seconds to wait for broker. Default: 60. Min: 5. |
sourceChain | number | ✓ | Chain ID where payment originates. Base = 8453, 0G = 16661 |
destChain | number | ✓ | Chain ID where service is executed |
timestamp | number | ✓ | Unix ms. Rejected if >30s stale. |
nonce | string | ✓ | Random string for replay protection |
signature | string | ✓ | EIP-191 signature of canonical intent fields |
Result Object Reference
| Field | Description |
|---|---|
intentId | Matches the submitted intent ID |
status | success | failed | pending | timeout |
data | Service result payload (arbitrary JSON) |
error | Error message if status is failed |
brokerAddress | Broker wallet address (verify signature against this) |
executedAt | Unix ms when broker completed execution |
transactionHash | On-chain tx hash of escrow release (if applicable) |
proof.kind | broker-signature or zk-groth16 |
proof.sig | Broker's signature over result payload |
proof.ogDaRootHash | 0G DA root hash of anchored result (permanent) |
cost | Actual USDC deducted from escrow |
Errors
| Status | Code | Cause | Fix |
|---|---|---|---|
| 402 | BUDGET_EXHAUSTED | Service lock < $12 minimum | Top up in Agentboard → Billing |
| 400 | INTENT_STALE | timestamp >30s in the past | Use current Date.now() |
| 400 | INVALID_SIGNATURE | Signature doesn't match intent fields | Re-sign with canonical field order |
| 404 | NO_BROKER | No broker available for destChain + type | Try different type or check broker list |
| 408 | BROKER_TIMEOUT | Broker didn't respond within timeout | Increase timeout or try again |
| 429 | RATE_LIMITED | Too many intents per minute | Back off and retry with jitter |
Become a Broker (Earn)
// Register as a broker
POST /api/data-bridge/brokers/register
Authorization: Bearer <obr_agent_token>
{
"types": ["oracle", "api"],
"supportedChains": [8453, 16661, 1],
"pricePerType": {
"oracle": "0.001",
"api": "0.003"
},
"endpoint": "https://your-broker.example.com"
}