The Bottleneck of On-Chain AI
Running artificial intelligence directly on a blockchain is functionally impossible. Smart contracts are designed for deterministic, lightweight logic. If you try to run a complex machine learning model or execute heavy AI inference on a standard EVM, the gas costs will instantly bankrupt the protocol, and the transaction will fail due to block gas limits. To build true AI trading agents, the heavy computation must happen off-chain. But if the compute happens off-chain, how does the smart contract know the off-chain server isn’t lying or manipulating the trade data? This is where Oasis ROFL (Runtime OFf-chain Logic) comes in.Enter ROFL and TEEs
Pawdex AI Agents do not rely on centralized, trusted servers. Instead, they utilize the Oasis ROFL framework, which executes off-chain compute inside Trusted Execution Environments (TEEs), such as Intel SGX. A TEE is a secure enclave running on a node’s hardware. It isolates the AI computation from the rest of the machine, ensuring that not even the node operator can see, alter, or tamper with the trading strategy being executed inside.The Execution Flow
- Data Ingestion: The Pawdex AI Agent (running inside a TEE) fetches real-time data. Because it is off-chain, it can process massive datasets that smart contracts cannot access, such as Binance order book depth, X (Twitter) sentiment, or cross-chain liquidity metrics.
- Strategy Inference: The AI model processes the data and determines the optimal trading strategy (e.g., “Buy 50,000 ROSE using Pawdex Aggregator”).
- Cryptographic Attestation: The TEE generates a cryptographic proof verifying that the specific AI model executed exactly as coded, without any external tampering.
- On-Chain Settlement: The agent submits the trade and the cryptographic proof to the Pawdex smart contract on Oasis Sapphire. The contract mathematically verifies the proof. If valid, the trade executes.
Why ROFL is Critical for Pawdex
By building our agent infrastructure on Oasis ROFL, Pawdex delivers three massive advantages over traditional trading bots:1. Zero Strategy Leakage (Alpha Protection)
If you build a highly profitable trading bot on Ethereum or Solana, MEV searchers will immediately analyze your on-chain calls, reverse-engineer your strategy, and front-run your trades. With ROFL, your agent’s logic is processed inside the black box of a TEE. The public mempool only sees the final, verified transaction, not the strategy that triggered it.2. Trustless Web2 APIs
Smart contracts typically require centralized oracles (like Chainlink) to fetch off-chain data. ROFL allows Pawdex Agents to natively securely query Web2 APIs directly from the enclave. An agent can read a Telegram channel, analyze the text, and execute a trade based on the sentiment, all completely trustlessly.3. Autonomous Execution
Traditional bots require a centralized server (like an AWS instance) holding a private key to sign transactions. If that server is hacked, the wallet is drained. Pawdex Agents derive their signing keys directly within the TEE. The agent itself holds custody of the trading funds, making it a sovereign, autonomous financial entity.Next, we will break down how these agents operate on-chain and how users can securely subscribe to them using Agent Smart Wallets.