back

2025-08-18

Solmate vs Solady - The evolution of gas-optimized Solidity

Dev tooling

In the competitive landscape of Solidity libraries, where gas efficiency can dictate a protocol's viability, Solmate and Solady represent two milestones in optimization. Solmate, created in 2021 by transmissions11, pioneered a minimalist, high-performance approach to common primitives. It quickly became a staple in DeFi for its audited, opinionated design.

However, Solady—launched in 2022 by Vectorized as an experimental fork and extension—has gained significant traction, offering deeper gas savings and a broader scope of utilities.

Historical context: From Solmate's breakthrough to Solady's succession

Solmate disrupted the space by providing "modern, opinionated, and gas-optimized building blocks" for smart contracts, including tokens (ERC20, ERC721, etc.), utilities (FixedPointMathLib, SafeTransferLib), and authorization modules. Its v6 release was audited, and it emphasized minimalism—explicitly noting it was "not designed with user safety in mind," urging devs to review code carefully. By 2022, it was widely adopted with 4.3k GitHub stars and integrations in Foundry and Hardhat.

Solady began as a "laboratory for cutting-edge snippets" inspired by Solmate, often merging optimizations back into it initially. Over time, Solady evolved into a standalone powerhouse with its own audits from Cantina and Spearbit. Benchmarks in fixed-point math and token operations consistently favored Solady for lower gas usage, driving adoption in performance-critical projects.

This shift aligns with Ethereum's post-Dencun era, where gas costs demand ever-tighter optimizations.

Solady's key advantages

Solady amplifies Solmate's ethos with advanced Yul assembly, expanded utilities, and superior efficiency:

Gas Efficiency

  • Solady: Ultra-optimized with 300-500 gas savings per call vs competitors in benchmarks
  • Solmate: Strong but higher in direct comparisons, especially in edge cases
  • Why it matters: Critical for high-volume DeFi where savings compound

Scope & Functionality

  • Solady: Comprehensive coverage of ERC standards (20/721/1155/4626/6909), advanced libs (Sort, LibString, hashing), and upgradeable variants
  • Solmate: Core primitives only (tokens, math, auth)
  • Why it matters: One-stop shop reduces dependency juggling

Audit & Reliability

  • Solady: Recent Cantina/Spearbit audits addressing evolving EVM changes
  • Solmate: Audited (v6) and battle-tested but static
  • Why it matters: Modern scrutiny catches new edge cases

Community Adoption

  • Solady: 4,767 dependents, 3.3k stars
  • Solmate: 1,382 dependents, 4.3k stars
  • Why it matters: Higher active usage signals where the ecosystem is moving

What Solmate established

Solmate deserves credit for proving the category and influencing the ecosystem profoundly. Before Solmate, gas-optimized alternatives to OpenZeppelin were scattered one-offs.

Key contributions:

  • Minimalist philosophy - stripped unnecessary checks for raw performance
  • Opinionated design - made clear trade-offs rather than trying to serve everyone
  • Audited foundation - proved gas optimization could be production-ready

Many of Solady's patterns directly build on Solmate's groundwork. Solady started as snippets meant to merge back into Solmate, but evolved into a comprehensive standalone library.

What Solmate missed

Solmate's minimalism became its limitation as demands grew:

  • Optimization iteration. Solmate's gas profiles were innovative but didn't keep pace. Solady's iterative Yul tweaks outperformed in benchmarks for functions like fixed-point operations.

  • Expanded functionality. Limited to basics, it forced devs to mix libraries for advanced needs (sorting, strings, etc.), while Solady consolidated them.

  • Scope constraints. Solmate focused narrowly on core primitives, leaving gaps that Solady filled with utilities like LibString, LibSort, and advanced hashing functions.

Developer activity tells the story

The numbers are unambiguous. Solady has overtaken Solmate in active project adoption.

Chart showing Solmate at 1,382 projects vs Solady at 4,767 projects in open source usage

Solady is used in 4,767 projects compared to Solmate's 1,382—a 3.5:1 ratio favoring the newer library. This is remarkable given Solmate's year head start and early dominance.

The shift reflects Solady's broader utility scope and aggressive gas optimizations attracting new projects, while existing Solmate users often stick with what works.

What's particularly telling is the contrast between stars and dependents. Solmate still leads in GitHub stars (4.3k vs 3.3k)—reflecting its historical prominence—but Solady leads in actual dependents. Stars measure past attention; dependents measure current usage.

The OpenZeppelin question

Both Solmate and Solady position themselves as alternatives to OpenZeppelin, but the choice isn't always binary:

Choose OpenZeppelin when:

  • Security is the primary concern
  • Your team includes junior Solidity developers
  • You need extensive documentation and audit trails
  • Gas costs aren't your main constraint (L2s, low-frequency operations)

Choose Solady when:

  • Maximum gas efficiency is critical
  • You need the broad utility library
  • You're comfortable with inline assembly
  • You want comprehensive ERC standard coverage

Choose Solmate when:

  • You prefer a smaller, more focused dependency
  • Your codebase already uses it
  • You want battle-tested simplicity over breadth

Community perspectives

The community largely views Solady as the winner, though Solmate earns respect for its pioneering role.

Pro-Solady sentiment: Developers praise its "cutting-edge" snippets and gas wins. Benchmarks showing 300-500 gas savings per ERC20 call are frequently cited. Community polls lean Solady for new work.

Pro-Solmate holdouts: Some prefer Solmate for its simplicity and established audits. Its focused scope makes it easier to audit and reason about.

Balanced views: Many see Solady as a natural evolution—Solmate inspired it, and the torch has been passed. Recent audits have bolstered trust in Solady's more aggressive optimizations.

Conclusion: Evolution in action

Solady built on Solmate's foundation—delivering superior optimizations and wider scope. The data reflects this: Solady's 4,767 dependents vs Solmate's 1,382 shows where new projects are landing.

Both libraries serve the gas-optimization community well. Solmate proved the category and remains a solid choice for focused use cases. Solady expanded the vision with comprehensive utilities and aggressive optimizations. The choice depends on whether you need breadth or simplicity—but for new projects prioritizing gas efficiency, the momentum clearly favors Solady.