
Orcus - MEV-Resistant Dark Pool Trading Agent
An autonomous, multi-chain dark-pool trading agent that keeps trading intent encrypted until settlement is final, across 6 EVM chains and Sui.
Timeline
0G APAC Hackathon 2026
Role
Full Stack Blockchain Developer
Team
Hooman Digital
Status
CompletedTechnology Stack
Key Challenges
- Encrypting trading intent in the browser before it touches the chain
- Running sealed AI inference inside a TEE so no operator can read the strategy
- Settling atomically across both EVM and Sui Move without leaking to the mempool
- Removing all agent discretion over the swap so the vault stays non-custodial
Key Learnings
- TEE and enclave computing with 0G Compute
- ECIES public-key encryption for on-chain intents
- The Move hot-potato pattern for forced atomic settlement
- Designing a multi-chain agent with one process per chain
Orcus - MEV-Resistant Dark Pool Trading Agent
Overview
Orcus is an autonomous, multi-chain trading agent that keeps a user's trading intent encrypted until settlement is final. A user submits an encrypted strategy to a Strategy Vault on the chain of their choice. The agent decrypts it inside a Trusted Execution Environment on 0G Compute, computes technical indicators, decides whether to execute, writes an immutable audit receipt to 0G Storage, and settles the swap on-chain. At no point does any validator, front-runner, or observer see what the user intended to trade.
Orcus received the 0G APAC Hackathon 2026 Excellence Award on June 12, worth approximately $4,000.
The Problem
Every DEX transaction today is visible in the public mempool before it confirms. Bots monitor this pool, see a pending swap, and sandwich it, buying before you and selling after, extracting value at your expense. Sandwich attacks alone extracted around 60M USD from Ethereum traders in a single year. Existing fixes make tradeoffs: private mempools centralize trust, commit-reveal adds latency and a second transaction, and MEV-Share still leaks partial information.
Orcus eliminates the attack surface. The intent is ECIES-encrypted in the browser, only a sealed TEE enclave can read it, and the swap settles in a single atomic transaction that no one can front-run.
Key Features
Client-Side Encryption
The user composes a strategy in the dashboard. Before it leaves the browser it is encrypted with ECIES-256 using the agent's published public key, then submitted to the Strategy Vault alongside a deposit in one transaction. On-chain, anyone can see a deposit and a blob of opaque bytes, but nothing about what the user wants to do.
Sealed AI Inference
The agent decrypts the ciphertext and builds a market snapshot with live price and indicators. Typed strategies are evaluated in code, which is authoritative, while a model running inside an Intel TDX enclave on 0G Compute writes the human-readable reason. Free-text goals route through the enclave for a straight EXECUTE or WAIT decision. Input, output, and weights are invisible to the node operator.
Verifiable Audit Receipts
Before every execution the agent uploads a JSON receipt (market snapshot, indicators, oracle floor, and the decision trail) to 0G Storage and gets back a merkle root, which is stored on-chain in the trade event. This creates a permanent, independently verifiable link between an execution and its proof. 0G Storage is used for every trade on every chain.
Real Settlement Across Chains
Orcus uses a mock router where testnets have no liquidity and a real DEX where they do. On Ethereum Sepolia it settles through the real Uniswap V3 SwapRouter02 in real USDC, and on Sui it settles through real DeepBook v3, swapping SUI to DBUSDC against live order-book liquidity.
How It Works
The agent is a TypeScript service, one process per chain. When it finds an active intent it decrypts the ciphertext, builds a market snapshot from live indicators, decides the action, uploads the decision receipt to 0G Storage, signs the execution parameters with an EIP-712 attestation, and calls the vault. The vault refreshes an independent oracle, computes a slippage floor, performs the swap, and sends the settlement token directly to the user.
The Strategy Vault carries zero calldata discretion. Only the authorized agent can trigger execution, and even then the vault builds the swap itself, forces the recipient to be itself, reads an independent oracle price floor, and verifies an EIP-712 attestation over a per-user nonce. Users can withdraw at any time and have a cancel escape hatch.
On Sui, settlement uses a hot-potato flow: the vault returns the user's funds plus a SwapTicket struct that has no abilities, so the Move type system forces it to be consumed in the same transaction. This lets the agent route through real DeepBook v3 inside one programmable transaction block without the vault depending on DeepBook.
Tech Stack
Smart Contracts
- Solidity 0.8.24 on six EVM chains with OpenZeppelin, an EIP-712 attestation, and an oracle price floor.
- Move on Sui with a capability-gated vault, ed25519 attestation, and the hot-potato SwapTicket pattern.
Agent and Privacy
- TypeScript and Node.js for the per-chain agent runtime.
- 0G Compute for sealed inference inside an Intel TDX enclave.
- 0G Storage for merkle-anchored audit receipts.
- ECIES-256 for browser-side intent encryption.
Frontend
- Next.js and React with wagmi, viem, and RainbowKit for EVM plus the Sui dApp Kit for Sui, sharing one query client.
Challenges and Solutions
Keeping Intent Private End to End
Encryption happens in the browser and decryption only inside the TEE, so the plaintext strategy never exists anywhere an operator or a mempool watcher can read it.
Removing Agent Discretion
The vault builds the swap and forces the recipient to itself, so a compromised agent cannot redirect funds. Every execution needs an EIP-712 attestation over a per-user nonce, making forged or replayed executions impossible.
One Settlement Model, Two Virtual Machines
A single StrategyVault contract works across all EVM chains by varying only the router and settlement token, while the Move hot-potato pattern gives Sui the same atomic guarantee without coupling the vault to DeepBook.
What I Learned
- How to design MEV resistance around a Trusted Execution Environment instead of a private mempool.
- ECIES public-key encryption and how to anchor verifiable receipts on decentralized storage.
- The Move ability system and the hot-potato pattern for forcing atomic settlement.
- Building and operating a multi-chain agent as one process per chain with shared attestation logic.
