Generator
Deployed
PRION Audit · ABRIN
How It Works

Generate Privacy Contract

Describe what you need in plain English. The AI will generate, compile, and optionally deploy a privacy-preserving Solidity contract on 0G Chain.

⏱ Generation, audit, and auto-fix can take up to 10 minutes for complex prompts with Sonnet. Please don't close this tab.

Deployed on 0G Mainnet

Privacy contracts generated by Division and deployed on 0G Chain.

Privacy Patterns

Division generates contracts using these privacy-preserving patterns:

🔐

Commit-Reveal

Submit hash first, reveal later. Prevents front-running and ensures fairness in voting, auctions.

🔑

Nullifiers

One-time use tokens that prevent double-spending without revealing user identity.

🌳

Merkle Trees

Prove membership in a set without revealing which specific element. Used in mixers.

🛡️

Hash Locks

Conditional transfers that execute only when a secret preimage is revealed.

PRION AUDIT · POWERED BY ABRIN
Paste your Solidity contract below. PRION runs 12 parallel specialist AI heads — each targeting a distinct attack class (reentrancy, DeFi economics, crypto math, access control, MEV, upgradeability, …). Consensus in ~10-15 seconds.

How Division Privacy Works

01

Describe

Tell the AI what privacy contract you need in plain English

02

Generate

Code Agent creates Solidity using privacy patterns (commit-reveal, nullifiers, Merkle)

03

Compile

Hardhat compiles the contract. If errors, Refine Agent auto-fixes them

04

Deploy

One-click deploy to 0G Chain (testnet or mainnet)

Architecture

┌─────────────────────────────────────────────────┐
│                 Division Privacy                      │
│                                                  │
│  User Description                                │
│       ↓                                          │
│  ┌──────────┐    ┌──────────┐    ┌──────────┐   │
│  │   Code   │───→│ Hardhat  │───→│  Refine  │   │
│  │  Agent   │    │ Compile  │    │  Agent   │   │
│  └──────────┘    └──────────┘    └──────────┘   │
│       │               ↑               │          │
│       │               └───────────────┘          │
│       ↓           (fix errors loop)              │
│  ┌──────────┐                                    │
│  │  Deploy  │→ 0G Chain (EVM)                    │
│  └──────────┘                                    │
│                                                  │
│  LLM Providers:                                  │
│  • DeepSeek V3 (primary)                         │
│  • Groq Llama 70B (fast)                         │
│  • 0G Compute (primary, decentralized AI)         │
│                                                  │
│  Privacy Patterns:                               │
│  • Commit-Reveal  • Nullifiers                   │
│  • Merkle Trees   • Hash Locks                   │
│  • Access Control • ZK-like Proofs               │
└─────────────────────────────────────────────────┘
        

Use the SDK

Python
CLI
HTTP API
pip install division-privacy

from division_privacy import generate, PRIVACY_TASKS

# Generate from description
result = await generate(
    "Create a private voting contract",
    contract_name="PrivateVoting",
    provider="deepseek"
)

print(result["code"])      # Solidity source
print(result["compiled"])  # True/False

# Use a preset task
task = PRIVACY_TASKS["mixer"]["description"]
result = await generate(task, "PrivateMixer")
        
# Clone and install
git clone https://github.com/Acteq1391gp/division-privacy
cd division-privacy
pip install -r requirements.txt

# Generate contract
python -m division_privacy generate \
  --name "PrivateVoting" \
  --desc "Create a private voting contract" \
  --provider deepseek

# Run benchmark (all 25 tasks)
python -m division_privacy benchmark --provider deepseek

# Deploy to 0G
cd contracts
npx hardhat run scripts/deploy.ts --network 0g-mainnet
        
# Health check
curl http://localhost:3001/api/health

# List examples
curl http://localhost:3001/api/examples

# Generate contract
curl -X POST http://localhost:3001/api/generate \
  -H "Content-Type: application/json" \
  -d '{
    "name": "PrivateVoting",
    "description": "Create a private voting contract",
    "provider": "deepseek"
  }'

# Deploy
curl -X POST http://localhost:3001/api/deploy \
  -H "Content-Type: application/json" \
  -d '{"name": "PrivateVoting", "network": "0g-mainnet"}'