CrossRevEngine
AI-Orchestrated Ghost Liquidity. Teleporting Aqua pools via LayerZero.
Problem Statement
CrossRevEngine is an autonomous omnichain liquidity engine that “teleports” market-making strategies across blockchains. Instead of leaving capital idle in traditional AMMs, it deploys Ghost AMMs — ephemeral liquidity pools that materialize only when an opportunity is detected, execute a programmable trading strategy, and dissolve immediately after capturing value.The system combines Chainlink CRE, LayerZero V2 + Stargate V2, and 1inch Aqua + SwapVM to bridge not only tokens, but full strategy bytecode across chains. A CRE-powered AI agent continuously monitors market conditions, compiles an optimal SwapVM program, signs a report, and triggers a cross-chain execution. LayerZero carries the bytecode + capital in a single message, and the destination chain instantly spawns a custom AMM with programmable curves (Constant Product, Constant Sum, XYC).Each Ghost AMM exists just long enough to execute its trade, then docks and returns capital. This creates a new paradigm: just-in-time, portable liquidity, programmable on demand, omnichain-native, and fully autonomous.
Solution
The project is built as a tightly integrated three-layer system: CRE Brain → LayerZero Body → Aqua Ghost Execution.The “Brain” is a Chainlink CRE workflow written in TypeScript. It orchestrates AI-driven inference, sentiment feeds, market data, and on-chain intelligence, then compiles trading logic into SwapVM bytecode. The workflow cryptographically signs a payload and triggers an on-chain entrypoint. We used the CRE CLI to simulate every execution path, then deployed the workflow to a DON for real, fault-tolerant operation.The “Body” extends LayerZero’s OApp logic with custom message packing, derivation of execution parameters, and a dual-stage compose flow that teleports both assets (via Stargate V2 OFT) and strategy code in the same transaction. We implemented custom compose handlers, safety checks, peer validation, and novel message formats that go beyond the base OApp/OFT abstractions.The “Ghost” layer is a custom Aqua app powered by SwapVM. We directly manipulate the VM opcodes to define programmable curves and register ephemeral virtual-balance strategies on-chain. The executor contract decodes the SwapVM bytecode inside lzCompose, ships the strategy to Aqua, executes swaps, and later docks to free capital. This pipeline demonstrates full cross-chain state movement + code execution + on-chain liquidity instantiation — all within seconds.We connected all components with end-to-end scripts, tests, and a live demo (Arbitrum → Base). The result is an omnichain, AI-orchestrated, Aqua-native liquidity engine built from scratch during the hackathon using LayerZero, SwapVM, and CRE in ways not demonstrated before.
Hackathon
ETHGlobal Buenos Aires
2025
Contributors
- cqlyj
72 contributions