RayStylus
On‑Chain Ray Tracing & Neural Rendering with Arbitrum Stylus
视频
描述
Live Demo: https://raystylus.vercel.app/
Contract: https://sepolia.arbiscan.io/address/0x1bd8e7e9b1d0824eb97535af61bbaed0a9dd5757
🧩 Project Description
RayStylus is a high-performance on-chain graphics and computation experiment built for the Arbitrum Stylus ecosystem, designed to demonstrate what becomes possible when smart contracts are no longer constrained by traditional EVM limitations.
Instead of another DeFi primitive, RayStylus tackles a problem that is traditionally impossible on-chain: executing real-time 3D ray tracing—a computationally intensive graphics algorithm—fully inside a Stylus (Rust → WASM) smart contract. The solution is a deterministic 32×32 ray-traced sphere scene, computed entirely on-chain using mathematically precise ray–sphere intersection logic. Every pixel is verified through actual geometric calculations, not approximations or off-chain rendering.
To prove that on-chain computation extends beyond graphics into adaptive logic, RayStylus embeds a mini neural network (MNN) inside the contract. The MNN accepts three aesthetic parameters—warmth, depth, and intensity—and applies non-linear transformations to the ray-traced output's color space. This demonstrates that Stylus can handle non-linear, adaptive computation in a trustless environment, not just static rendering.
User interaction is powered by an OpenAI-integrated configuration layer. Users express intent in natural language (e.g., "make it deeper", "shift toward cooler colors"). OpenAI translates this intent off-chain into strict, deterministic numerical parameters (warmth, depth, intensity values). These parameters are then sent to the contract and executed on-chain. No AI inference happens on-chain—ensuring reproducibility, safety, and full determinism.
The frontend is built with Next.js and TypeScript, delivering a zero-lag, interactive UI that instantly visualizes the on-chain output.
RayStylus is intentionally positioned as a technical showcase and reference architecture, answering a single research-driven question:
How far can Stylus push on-chain computation beyond finance?
All ray tracing and neural computation occurs fully on-chain inside the Stylus smart contract. Off-chain components are strictly limited to intent translation and never influence execution results.
✨ Core Features
🟣 [CORE] Fully On-Chain Ray Tracing Engine
The heart of RayStylus: deterministic ray–sphere intersection calculations powering a 32×32 pixel render grid, entirely computed on-chain in Rust and compiled to WASM via Arbitrum Stylus. Every pixel is mathematically verifiable through ray-sphere geometry. This is the primary computational achievement.
🧠 [SUPPORT] Mini Neural Network Layer
A lightweight neural model embedded inside the smart contract that enhances the ray-traced output. It takes three aesthetic control parameters—warmth (cool-to-warm color palette), depth (shadow-to-light intensity), and intensity (saturation and contrast)—and applies non-linear transformations to the color space. The MNN is the how ray tracing becomes beautiful; it supports and refines the core ray-tracing engine without replacing it.
🤖 [ORCHESTRATION] AI-Powered Configuration
Natural-language instructions from the user are processed by OpenAI to convert intent into deterministic rendering parameters (warmth, depth, intensity values). These parameters feed both the ray tracing engine and the MNN support layer. On-chain logic remains fully deterministic and verifiable—AI never touches execution.
⚡ [DELIVERY] Zero-Lag User Experience
Near-native execution speed via Stylus WASM means no off-chain render servers or trusted compute. Every rendered output is reproducible and verifiable on-chain.
🧑💻 User Flow
User opens the RayStylus interface ( Studio Page or Machine Learning Aesthetic page )
User selects or instructs AI to modify rendering parameters
Parameters are sent to the Stylus smart contract
Contract executes ray tracing + neural adjustment on-chain
Rendered output is returned and visualized instantly
System Architecture

🛠️ Tech Stack
Blockchain: Arbitrum Sepolia
Smart Contract: Stylus Contract (0x1bd8e7e9b1d0824eb97535af61bbaed0a9dd5757)Frontend: Next.js, TypeScript
AI Integration: OpenAI (intent-to-parameter mapping)🧪 Why RayStylus Matters
RayStylus is built for builders who want to see what's actually possible. It's not a pitch—it's a proof.
It works. A real Stylus contract, deployed and live, executing compute-heavy graphics logic that would never fly on standard EVM chains. Ray tracing on-chain. Neural networks on-chain. No shortcuts, no hand-waving.
It's beautiful. Interact with it, watch it render in real-time, and the experience is smooth. No lag, no weird delays—just instant visual feedback powered by Rust WASM performance.
It's different. While everyone else submits DeFi derivatives, RayStylus pushes into graphics and adaptive computation—territory no one really talks about on blockchain. That matters.
It's honest. AI handles one job: understanding what you want and turning it into numbers. The contract doesn't touch any of that. Everything that matters—every pixel, every calculation—happens on-chain, verifiable and deterministic. No magic, no trust assumptions hiding in the corners.
The point? RayStylus shows judges (and future builders) that Stylus doesn't just move money faster. It fundamentally changes what you can build. Graphics. Real computation. Logic that's too expensive for EVM but perfectly native to WASM.
This is the mental model shift: smart contracts don't just handle finance—they handle worlds.
🧠 Final Note
RayStylus is not a product—it is a signal.
A signal that on‑chain computation can move beyond transfers and swaps, toward graphics, AI, and high‑performance logic—all verifiable, deterministic, and trustless.
RayStylus proves that smart contracts don't just move value — they can render worlds.
本次黑客松进展
RayStylus was built from scratch during this hackathon sprint. The team delivered a fully functional Stylus contract with deterministic ray tracing, an embedded neural network, and a complete Next.js frontend—all integrated and live. Completed: Rust-based ray tracing engine compiled to WASM (32×32 pixel render grid, ray-sphere intersection logic) Mini neural network layer with warmth, depth, and intensity parameters OpenAI integration for natural-language intent translation Smart contract deployment on Arbitrum Stylus testnet Next.js frontend with real-time visualization System architecture documentation and reference implementation Current Status: Fully functional prototype, ready for interaction and demonstration.
技术栈
融资状态
RayStylus is currently not raising capital. This project exists as a technical reference and proof-of-concept, demonstrating the capabilities of Arbitrum Stylus for future builders in the ecosystem. Any future development would be community-driven or partnership-based, focused on expanding the scope of on-chain computation rather than traditional venture funding.