AI Agents Are Now Writing Rust Smart Contracts, and They're 30% Cheaper Than Solidity
Your AI coding assistant can now write smart contracts in Rust, and they’ll run 30-50% cheaper than the Solidity you’d write yourself. As of two days ago.
On February 20, 2026, the Arbitrum Foundation released a Claude Code skill that lets AI agents scaffold complete Arbitrum dApps with a single command. Rust contracts that compile. Solidity interop that works. A React frontend with wallet integration. The whole stack.
I keep coming back to the same thought: this is the moment AI agents became capable of writing production blockchain infrastructure in a language that’s economically superior to Solidity while maintaining full Ethereum compatibility.
Here’s why that matters.
What just happened
The toolkit is a structured set of reference files that load into Claude’s context when you’re working on an Arbitrum project. You install it with one command:
git clone https://github.com/hummusonrails/arbitrum-dapp-skill.git ~/.claude/skills/arbitrum-dapp-skill
After that, your AI assistant understands Arbitrum Stylus, the dual-VM architecture that runs WebAssembly smart contracts alongside traditional EVM contracts on Arbitrum. It knows how to write Rust contracts using SDK v0.10 patterns, set up cross-contract calls between Rust and Solidity, and configure a local Arbitrum devnode with pre-funded test accounts.
The Arbitrum Foundation describes it like this: “You install it with one command and your AI assistant can scaffold a complete monorepo, write Stylus contracts that compile correctly, set up cross-language interop between Solidity and Rust, and configure a local devnode with pre-funded accounts.”
What makes this different from normal AI code generation is that the skill eliminates the ambiguity that makes AI output inconsistent. Instead of generating five slightly different project structures, the AI follows a single well-defined path. The toolkit is opinionated: pnpm for package management, Foundry for Solidity, viem and wagmi for the frontend. That constraint is the feature.
What is Stylus?
Stylus launched on Arbitrum mainnet on September 3, 2024. It’s a second virtual machine running alongside the EVM that executes WebAssembly smart contracts. You write contracts in Rust, C, or C++, compile them to WASM, and deploy them to Arbitrum. They run at near-native speed and cost significantly less gas than equivalent EVM operations.
Full interoperability is what matters here. Solidity contracts can call Rust contracts. Rust contracts can call Solidity contracts. Both use standard ABI encoding. From the user’s perspective, there’s no difference. From the developer’s perspective, you can write performance-critical logic in Rust and keep standards compliance in Solidity.
The Arbitrum docs put it clearly: “Solidity and WASM contracts can call each other, so the language a contract was written in doesn’t affect interoperability.”
The gas performance story is real
Here’s where this stops being abstract and starts being about money.
In November 2025, RedStone (a modular oracle framework) ported their price feed verification logic from Solidity to Stylus and published benchmarks. The results:
For oracle feeds with 3 signers:
- 2 feeds: 103k gas (Solidity) vs. 75k gas (Stylus) → 26% savings
- 4 feeds: 166k vs. 123k → 26% savings
- 8 feeds: 297k vs. 218k → 26% savings
When you isolate pure computation (excluding fixed cryptography, calldata, and storage costs), the numbers get better:
- Base computational overhead: 35k (Solidity) vs. 23k (Stylus) → 34.3% reduction
- Per-feed computation: 16k vs. 8k → 50% reduction
RedStone’s conclusion: “Stylus gives us the best of both worlds: native speed Wasm for compute and seamless interop with Solidity contracts already live on Arbitrum. We can use Rust toolchains, tap Arbitrum precompiles, and still interact with the massive EVM ecosystem.”
Why is WASM faster? The EVM is a stack-based virtual machine with a 1,024-depth limit, 256-bit word overhead for all operations, and interpreted bytecode execution. WASM uses direct memory access, native 32/64-bit operations that match hardware, and gets compiled to near-native machine code. For compute-heavy workloads, the difference compounds.
The Arbitrum Foundation is direct about when to use each:
- Use Stylus for: memory-intensive operations, compute-heavy tasks, cryptographic operations
- Use Solidity for: simple storage/transfer, minimal computation, existing standards like ERC-20 or ERC-721
For trivial contracts that do “next to nothing,” Solidity may still be cheaper because there’s a 128-2048 gas overhead to jump into WASM execution. But for anything with real computation, Stylus wins.
Why AI + Rust works better than AI + Solidity
This is where the toolkit announcement becomes more interesting than just “another dev tool.”
AI struggles with Solidity. It’s a niche blockchain language with limited training data. The compiler errors are often cryptic or only show up at runtime. The type system is loose enough that AI can generate code that looks reasonable but has subtle bugs.
AI is good at Rust. Rust is a mainstream systems programming language with a massive online corpus in AI training sets. The compiler errors are informative and actionable. The strong type system rejects invalid code immediately. AI-generated Rust contracts compile more reliably than AI-generated Solidity.
The Arbitrum Foundation’s framing: “The fix isn’t better prompting. It’s better context.”
The Claude Code skill provides that context. It knows SDK v0.10 patterns for cross-contract calls via #[public] traits. It understands how to add new entry points using the #[entrypoint] macro. It generates correct interfaces for Solidity ↔ Rust communication. It maintains consistency across Rust, Solidity, and TypeScript files in a single monorepo.
A typical Stylus project has Rust contracts for compute-heavy logic, Solidity contracts for standard interfaces, and a TypeScript frontend tying it together. Keeping those patterns consistent across three languages and two VMs is exactly where AI tooling adds value.
The AI agent connection
This is where things loop back on themselves in a way that feels significant.
On February 5, 2026, ERC-8004 (the standard for on-chain AI agent identity) went live on Arbitrum. The standard defines three registries:
- Identity Registry: a digital passport for AI agents (live contract: 0x8004a169fb4a3325136eb29fa0ceb6d2e539a432)
- Reputation Registry: behavioral history tracking and reliability scoring
- Validation Registry: proof of completed tasks and verification of capabilities
As of mid-February 2026, nearly 21,000 agents are registered across 16 networks including Ethereum, Arbitrum, Base, Polygon, and others.
The reputation registry is the piece that benefits from Stylus. Scoring agent reliability across a network requires iterative computation that’s expensive in the EVM but feasible in WASM. The same gas savings that make oracle verification cheaper apply to AI agent reputation algorithms.
Then there’s x402, a protocol that gives HTTP’s 402 “Payment Required” status code actual functionality for machine-to-machine payments. An AI agent requests a service, the server responds with HTTP 402, the agent sends a signed USDC payment, the service fulfills the request. Arbitrum has a demo implementation that shows metered AI inference with automatic batch settlement.
The feedback loop: AI tools make it easier to write Stylus contracts. Stylus makes it practical to build AI infrastructure on-chain. Each side accelerates the other.
As the Arbitrum Foundation puts it: “A developer who’s never written a Stylus contract can install an AI skill and have a working project in minutes. That same project might include a contract that registers an AI agent onchain, or processes payments for an AI service, or verifies the output of an inference model. The tools that help you build are also the tools you’re building for.”
What this unlocks
The practical use cases come down to economics: what becomes viable when computation costs 26-50% less?
Compute-heavy DeFi: Options pricing models like Black-Scholes calculations on-chain. Complex derivatives with multi-variable risk calculations. Real-time portfolio risk models. High-frequency trading logic. These are economically infeasible in Solidity but plausible in Stylus.
Oracle infrastructure: RedStone’s case study is the proof of concept. More frequent updates, more complex verification, lower operating costs.
ZK proof verification: Verifying zero-knowledge proofs on the EVM is expensive. Native cryptographic operations at a fraction of EVM cost change the equation.
On-chain gaming: Game logic computation is too expensive in the EVM for complex mechanics. Stylus enables performant on-chain game state updates at sustainable gas costs.
AI agent infrastructure: Reputation algorithms, payment settlement, task verification. All the computational overhead of coordinating autonomous agents.
The bigger picture
I’m genuinely curious where this goes.
Smart contract development is abstracting away from Solidity. You can now write in Rust and get better performance while keeping full Ethereum compatibility. AI agents are first-class builders, not just users. The Rust ecosystem is merging with the Ethereum ecosystem.
The traditional narrative has been that Ethereum’s network effects and developer familiarity lock in Solidity despite its limitations. This toolkit shows a path where you get EVM compatibility and Ethereum security while writing in a language that’s both AI-friendly and economically superior for certain workloads.
Stylus is Arbitrum-specific. It’s not a general Ethereum standard. But Arbitrum is a major L2 with billions in TVL. If AI agents start building production infrastructure there in Rust, and that infrastructure is cheaper to operate than Solidity equivalents, that’s a data point about where smart contract development goes next.
Two days ago, an AI coding assistant couldn’t write a Stylus contract without hallucinating non-existent SDK patterns. Now it can scaffold a complete production-ready project in minutes. That’s a step function, not incremental progress.
I keep thinking about the feedback loop. The tools that help you build are also the tools you’re building for. That’s the part that sticks.
Sources: Arbitrum Foundation: AI and Stylus Builder’s Toolkit, RedStone Finance: Arbitrum Stylus & WASM Performance Analysis, Arbitrum Stylus Documentation, Claude Code Skill Repository. Data as of February 22, 2026.