Stylus Saturdays, 31st August 2024
Super exciting times at web3 high for Arbitrum! This weekend, Stylus on mainnet is right around the corner on the 3rd of September! This episode of Stylus Saturdays will recap some projects that have open sourced their Stylus code, and some of the ways it gives them an advantage.
What’s Stylus again?
Simply put, Stylus is a way to write EVM contracts with a WASM target, and initially with Rust and C. Future languages will also be supported.
Stylus is supported natively with the Arbitrum EVM. No bridging, drop-in replacement of existing contracts, zero friction. The native super easy experience!
Simplicity of the EVM and the expressiveness of Rust: the easiest development experience in the space. No remembering of bump seeds and account addresses. The simple “contract has your storage” experience. Ethereum has all the developers, and for good reason.
Arbitrum is the only EVM platform with WASM supported natively. Arbitrum IS the home of DeFi, with over $13 billion liquidity bridged to the chain!
How are teams using Stylus?
Superposition
Superposition has built a concentrated liquidity AMM with Stylus, and are building a DeFi orbit chain that pays you to use it. Longtail, being the chain’s default AMM, lives at https://github.com/fluidity-money/long.so. With Stylus, Longtail is substantially cheaper than Uniswap V3 for complicated and simple swaps. With Stylus, gas savings can be as high as 100x in some cases.
Renegade
Renegade have built a privacy-preserving trading platform using Stylus. We covered them in the first edition. After off-chain MPC, the team drops into ZKs for what the team uses to build the fully anonymous DEX.
Developers would normally build SNARKs using a special language or DSL, then compile circuits to Solidity (e.g., with Circom). With Arbitrum Stylus, the team are able to build their verifiers natively in Rust without any code generation: https://github.com/renegade-fi/renegade-contracts/blob/main/contracts-core/src/verifier/mod.rs#L47.
OpenZeppelin
OpenZeppelin have translated their contracts from Solidity to Stylus: https://github.com/OpenZeppelin/rust-contracts-stylus. Check out their post about this at https://blog.openzeppelin.com/next-gen-development-on-arbitrum-stylus
Upcoming grants/programs
An upcoming grants program for Stylus projects is in the discussion stage: https://forum.arbitrum.foundation/t/rfc-fund-the-stylus-sprint/26437
How can I learn more about Stylus?
The website: https://arbitrum.io/stylus
Awesome Stylus links: awesome-stylus
Rust SDK docs: https://docs.rs/stylus-sdk/latest/stylus_sdk/
OpenZeppelin docs: https://docs.rs/openzeppelin-stylus/0.1.0-alpha.1/openzeppelin_stylus/index.html
If your project has any updates you’d like to share, or you would like to request that we monitor your project’s developments to include you in the weekly newsletter, please reach out to @baygeeth on X!
Stylus Saturdays is powered by Superposition, the first defi-native layer 3 that pays you to use it. Try out the incentivised testnet at https://superposition.so