Live on Solana Devnet
 

AI agents are leaking your strategy on-chain.
Every data purchase, every signal, every API call — fully visible.
Veil routes payments through MagicBlock's Private Ephemeral Rollup so competitors see nothing.

View on GitHub How it works →
veil-agent — node agent/index.js
$node agent/index.js
🔑 Agent wallet: 4XdMJXryxg6KTLzQnumY...
🔐 Connecting to Private Ephemeral Rollup...
✅ Authenticated with MagicBlock PER
// [3] Simulating PUBLIC payment (no Veil)
⚠ PUBLIC: Sent 0.01 USDC to DemoApiWallet — VISIBLE to all chain observers
Sender: 4XdMJX... Recipient: DemoApi... Amount: 0.01 USDC Strategy: EXPOSED
// [4] Shielded payment via Veil + PER
📦 Building deposit tx (base chain → PER)...
✅ Deposit tx signed — ARKVqqe5+nsWKzYT6L...
🔒 Building private transfer inside PER...
🛡 Payment shielded — recipient and amount hidden from chain observers
Sender: [encrypted] Recipient: [encrypted] Amount: [encrypted] Strategy: PROTECTED ✅
📊 Signal received: BUY SOL @ 87% confidence | $168.4 target | 4h
🔄 Stealth session rotated — new ephemeral pubkey: EAsw5ST...
The Problem

Your AI agent is an open book

AI agents are now autonomous economic actors. But every payment they make is fully public on Solana. Anyone watching the chain can surveil your entire strategy.

👁️

Recipient Exposed

Competitors see exactly which data APIs, signal providers, and services your agent is paying for — and copy your sources.

💸

Amount Exposed

Payment amounts reveal how much you value each signal. Competitors can infer your conviction and position sizing.

📈

Frequency Exposed

How often you buy data reveals your trading cadence. Attackers can front-run your agent's predictable behavior.

The Fix

Veil shields everything

Data Point
Without Veil
With Veil + PER
Recipient
⚠ Exposed on-chain
🔒 Encrypted in PER
Amount
⚠ Exposed on-chain
🔒 Encrypted in PER
Frequency
⚠ Fully trackable
🔒 Not determinable
Agent Identity
⚠ Static wallet
🔒 Rotated per session
Strategy Risk
HIGH — strategy copied
ELIMINATED
Architecture

How Veil works

01

Authenticate with PER

Agent signs a challenge string via GET /challenge, exchanges it for a bearer token via POST /login. Session keys are ephemeral and rotated after every payment cycle.

02

Deposit into Private Ephemeral Rollup

USDC moves from Solana base chain into MagicBlock's TEE-backed PER via POST /deposit. Inside the rollup, all state is shielded from external observers.

03

Private transfer inside PER

POST /transfer with visibility: private — recipient, amount, and memo never appear on base chain. The API returns an unsigned tx, signed locally by the agent keypair.

04

Payment proof → API access

The signed tx hash becomes a payment proof token. The data API validates x-payment-proof and returns the signal. No payment, no data — gating works without revealing the payer.

05

Stealth session rotation

After each cycle, Veil generates a fresh ephemeral keypair and re-authenticates under a new identity. Chain observers see disconnected sessions — impossible to link as the same agent.

Stack

Built with

Privacy Layer
MagicBlock PER
Private Ephemeral Rollup — Intel TDX TEE-backed shielded state on Solana
Payment Protocol
x402 + PER API
HTTP-native micropayments wrapped with shielded transfer proofs
Blockchain
Solana Devnet
Sub-50ms execution, full composability, USDC native
SDK
@solana/web3.js
Keypair generation, tx signing, devnet RPC integration
Track
Privacy — Frontier
Colosseum Hackathon · MagicBlock + ST MY + SNS
Novel Primitive
Stealth Sessions
Per-payment ephemeral identity rotation — agents become unlinkable

Run it yourself

Clone the repo, start the mock API, run the agent. Full demo in under 60 seconds — no mainnet funds required.

$ git clone https://github.com/timmyonchain/Veil-Agent
$ npm install
$ node mock-api/server.js # terminal 1
$ node agent/index.js # terminal 2
View on GitHub ↗