Skip to content
← All decisions
ADR-0012026-05-10

Stylus over pure Solidity for compute-heavy contracts (Plinth, Vigil, Coffer, Sigil)

Context
SPAN margin computation is a nested loop. The Solidity equivalent is estimated at 10 to 100x more gas per the Arbitrum docs.
Decision
Plinth + Vigil + Coffer + Sigil in Rust + Stylus. Adapters, registries, and governance in Solidity.
Alternatives
All-Solidity (rejected: violates the gas goal). All-Stylus (rejected: the adapter ecosystem is Solidity-native; integration friction).
Consequences
The team must master both Rust and Solidity. The build pipeline is more complex (cargo stylus + Foundry). Worth it for the compute moat.