Pilow is a marketplace for TEE-sealed autonomous trading agents strategy authors mint their alpha as an iNFT that runs entirely inside 0G Sealed Inference, traders rent the agent's signals.




Pilow is a marketplace of sealed autonomous trading agents on the 0G decentralized AI stack. An author mints a trading strategy as an iNFT (StrategyINFT). The strategy runs inside an Intel TDX enclave on Phala Cloud, where the agent signing key is derived from the image measurement and never leaves the enclave. Every tick produces a TDX remote attestation quote whose hash is recorded on chain via DisputeResolver.recordAction, so anyone can challenge an action that was not produced by the attested binary. Renters subscribe to a sealed agent for a 30 day epoch and the agent trades on their behalf from a per strategy AgentWallet, with revenue split between author and protocol on chain.
Compute is served by 0G Compute (qwen-2.5-7b-instruct). Inputs and responses are pinned to 0G Storage with merkle proofs. Settlement (processResponse) is called after every inference so the compute ledger stays in sync with usage.
Pre work (before the hackathon clock): only a sketch of the iNFT idea and a private Solidity prototype that mints strategy NFTs. No TEE wiring, no compute integration, no frontend.
Built during the hackathon window:
1. Smart contracts. Wrote and deployed the four contract system on 0G Galileo: StrategyINFT (sealed strategy iNFT), AgentWalletFactory (per strategy wallet), RentalAndRevenue (30 day epoch subscriptions with on chain author and protocol split), DisputeResolver (TEE quote hash log with slashable challenge bond). Compiled with solc 0.8.24 evmVersion cancun (required for 0G Chain). Test suite covers minting, renting, revenue split, and challenge flow.
2. 0G Compute integration. Wired the agent runtime to 0G Compute through the official SDK. Provider discovery, ledger setup, sealed chatbot inference against qwen-2.5-7b-instruct, settlement via processResponse after every call. Patched the CJS shim via createRequire to work around the SDK ESM bundle that breaks on Node v25.
3. 0G Storage integration. Strategy artifacts uploaded to 0G Storage on mint, the returned storage root hash is what goes on chain in StrategyINFT.mintStrategy. Download path verifies the merkle root before the agent runtime parses the artifact.
4. Phala TEE agent. Built a Docker image of the agent (ghcr.io/fozagtx/pilow-agent), pushed to a public registry, deployed as a Phala CVM via the phala CLI. Inside the CVM the dstack SDK derives a deterministic signing key from the image measurement, generates a TDX RA quote per tick, and writes keccak256(quote) on chain through DisputeResolver.recordAction. The CVM derived agent address was authorized on DisputeResolver by the deployer.
5. Frontend. Next.js 16 (App Router, Turbopack) with Tailwind v4. Wallet via wagmi v2 with an injected only connector (works without a WalletConnect project id on the deployed site). Surfaces include a landing page with a tearable three js cloth in the hero, a dashboard that reads live on chain agent state, a mint wizard that maps strategy params to storageRoot and policyHash, a market view that reads RentalAndRevenue and lets renters subscribe with a single click, and an agent detail page for the strategy author.
6. End to end live proof on chain. Every step above produced a real tx hash on Galileo, listed in the Contract Address section above. The first attested tick (tx 0x85f1851f...4c49d) is the canonical proof: qwen ran inside the CVM, the agent hashed the TDX quote, and the hash is now on chain in DisputeResolver.
7. Deploy. Frontend live at https://pilow-trade.vercel.app. Vercel reads from main on every push.
What is intentionally not in scope for this hackathon: mainnet deploy, token economics, mobile app, multi chain bridge. Pilow targets a working sealed agent loop on 0G Galileo first.
Pilow is bootstrapped and was built for the 0G APAC Hackathon 2026 with no outside capital, no token, and no pre sale. The repo and contracts are entirely owned by the builder. Open to investor conversations after the hackathon if the project advances to mainnet.