# dragonfly-xyz/useful-solidity-patterns

Repository: https://github.com/dragonfly-xyz/useful-solidity-patterns
Canonical: https://ross.abutalabs.com/products/useful-solidity-patterns
Language: Solidity
License: MIT
License Family: permissive
Last push: 2025-04-10T16:48:00+00:00

## Health v2 (maintenance only)
Score: 39/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 15, release rhythm 35, longevity 100
- inputs: {"age_days": 1520, "days_push": 510, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1598, forks 177 (observed 2026-08-28T04:05:09.423240+00:00)

## What it is
An ongoing collection of practical Solidity/EVM smart contract patterns with concise, self-contained working code examples and tests. Each bite-sized guide explains patterns actually used in the wild in approachable terms for engineers of all skill levels.

## Use cases
- learn solidity patterns used in real contracts
- understand how flash loans work in solidity
- implement eip712 signed messages on-chain
- write upgradeable proxy contracts safely
- handle errors thrown by other contracts
- store large data on-chain cheaply with sstore2
- build commit-reveal mechanisms to prevent front-running
- work with non-compliant erc20 tokens

## When to choose
- you are learning or teaching Solidity and EVM development
- you need working, tested code examples of common smart contract patterns
- you want gas-saving tricks and idioms used in production contracts

## When to avoid
- you need production-ready, security-audited contract code to deploy as-is
- you need a reusable Solidity library rather than educational examples
- you are not working with Ethereum/EVM smart contracts

## Facets
- artifact type: learning-resource
- maturity: active
- function: developer-tools, documentation
- domain: blockchain, developer-tools, tutorials
- platform: cross-platform
- tags: solidity, smart-contracts, evm, patterns, educational, blockchain-development

## Member repositories
- dragonfly-xyz/useful-solidity-patterns (main) score 39

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.423240+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:53:16.170243+00:00, confidence not recorded.
  - readme: https://github.com/dragonfly-xyz/useful-solidity-patterns (fetched 2026-08-28T04:05:09.423240+00:00, sha 0b642d55514a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
