隐私层

jiayaoqijia2026-10-25查看 1989复制 1844

> 面向加密 agents 的隐私保护操作。涵盖

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md3519 chars
---
name: privacy-layer
description: >
  Privacy-preserving operations for crypto agents. Covers ZK-SNARK private transfers via
  Railgun Protocol, shielded balances, network egress monitoring, and confidential transaction
  patterns. Use when asked about private transfers, shielded transactions, or agent privacy.
---

# Privacy Layer

Privacy-preserving operations for AI agents handling sensitive financial data.

## ZK-SNARK Private Transfers (Railgun Protocol)

Railgun enables fully private ERC-20 transfers using ZK-SNARKs on Ethereum. Three core operations:

### Shield (Public → Private)
Move tokens from a public address into the Railgun privacy pool:
- Tokens become shielded — balance hidden from chain observers
- Agent receives a private note commitment
- On-chain: only the deposit amount and token are visible

### Private Transfer (Private → Private)
Transfer tokens within the privacy pool:
- Sender and receiver are hidden on-chain
- Amount is hidden via ZK proof
- Only the proof validity is verifiable

### Unshield (Private → Public)
Withdraw tokens from the privacy pool to a public address:
- Converts shielded balance back to standard ERC-20
- Receiver address becomes public

## Railgun Contract Addresses

| Network | Contract | Address |
|---------|----------|---------|
| Ethereum | Relay Adapt | `0xc3f2C8F9d5F0705De706b1302B7a039e1e11aC88` |
| Arbitrum | Relay Adapt | `0x5aD95C537b002770a39dea342c4bb2b68B1497aA` |
| Polygon | Relay Adapt | `0xc7FfA542736321A3dd69246d73987566a5486968` |
| BSC | Relay Adapt | `0x19B620929f97b7b990801496c3b361CA5bbC8E71` |

## Network Egress Monitoring

Monitor all outbound connections from the agent to detect data leaks:

- Track all RPC calls, HTTP requests, and WebSocket connections
- Classify targets as `external` vs `loopback`
- Log destination hosts, ports, and protocols
- Alert on unexpected outbound connections

## Agent Privacy Architecture

### 1. Secret Isolation
- Private keys never sent to LLM — all signing handled in isolated process
- Mnemonic stored with `0600` permissions (owner-only read)
- Config directory `0700` permissions

### 2. LLM Security Fence
- System prompt forbids revealing private keys, mnemonics, API keys
- Reduced tool surface — only expose necessary operations
- ClawWall DLP catches secrets before they reach the LLM

### 3. Private Inference
- Use Venice AI or local Ollama for zero-retention inference
- Sensitive data (portfolio values, strategies) processed without provider storage
- No training on agent queries

### 4. On-Chain Privacy
- Shield balances via Railgun before agent operations
- Private transfers between agent sub-wallets
- Unshield only when public settlement is needed

## Privacy Checklist for Agents

| Risk | Mitigation |
|------|------------|
| LLM sees private key | ClawWall DLP + system prompt fence |
| LLM provider stores queries | Venice (zero retention) or local Ollama |
| On-chain activity traced | Railgun shielded transfers |
| Network connections leak data | Egress monitoring + allowlist |
| Config files exposed | 0600/0700 permissions, fail-loud validation |
| Agent overshares in chat | Domain constraint — blockchain-only access |

## Usage Tips

- Shield tokens before any sensitive agent operations
- Use private transfers for inter-agent payments
- Monitor network egress during development to catch unexpected leaks
- Always use Venice or local models for strategy-sensitive reasoning
- Never expose raw portfolio data to third-party APIs without shielding
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧