{"id":15108713,"url":"https://github.com/0xisk/awesome-solidity-gas-optimization","last_synced_at":"2025-09-27T08:30:45.321Z","repository":{"id":38202484,"uuid":"401685175","full_name":"0xisk/awesome-solidity-gas-optimization","owner":"0xisk","description":"Best resources for Solidity gas optimizations ⛽","archived":false,"fork":false,"pushed_at":"2023-05-12T17:54:45.000Z","size":106,"stargazers_count":1198,"open_issues_count":0,"forks_count":102,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-09-20T14:17:12.842Z","etag":null,"topics":["awesome","awesome-list","ethereum","ethereum-blockchain","gas-optimization","linter-solidity","polygon","resources","smart-contracts","smart-contracts-audit","solidity","solidity-compiler","solidity-contracts","solidity-dapps","solidity-language","solidity-parser","solidity-security","web3-dapp"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xisk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":null},"created_at":"2021-08-31T11:54:48.000Z","updated_at":"2025-09-18T12:27:04.000Z","dependencies_parsed_at":"2024-01-15T19:45:42.803Z","dependency_job_id":"8cc0855b-e1d7-4ec3-9d1d-28eeef4a7292","html_url":"https://github.com/0xisk/awesome-solidity-gas-optimization","commit_stats":null,"previous_names":["iskanderandrews/awesome-solidity-gas-optimization","iskdrews/awesome-solidity-gas-optimization"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xisk/awesome-solidity-gas-optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xisk%2Fawesome-solidity-gas-optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xisk%2Fawesome-solidity-gas-optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xisk%2Fawesome-solidity-gas-optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xisk%2Fawesome-solidity-gas-optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xisk","download_url":"https://codeload.github.com/0xisk/awesome-solidity-gas-optimization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xisk%2Fawesome-solidity-gas-optimization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277175165,"owners_count":25773820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome","awesome-list","ethereum","ethereum-blockchain","gas-optimization","linter-solidity","polygon","resources","smart-contracts","smart-contracts-audit","solidity","solidity-compiler","solidity-contracts","solidity-dapps","solidity-language","solidity-parser","solidity-security","web3-dapp"],"created_at":"2024-09-25T22:22:47.411Z","updated_at":"2025-09-27T08:30:45.304Z","avatar_url":"https://github.com/0xisk.png","language":"Solidity","funding_links":[],"categories":["Gas Optimization"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eAwesome Solidity Gas-Optimization ⛽\u003c/h1\u003e\n  \u003ch6 align=\"center\"\u003e(Inspired from this issue https://github.com/iskanderandrews/troubleshooting/issues/38)\u003c/h6\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/sindresorhus/awesome\"\u003e\n      \u003cimg alt=\"awesome list badge\" src=\"https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#buildstatus\"\u003e\n      \u003cimg alt=\"build status badge\" src=\"https://github.com/bkrem/awesome-solidity/workflows/Build/badge.svg\"\u003e\n    \u003c/a\u003e\n\u003c!--     \u003ca href=\"https://github.com/bkrem/awesome-solidity/graphs/contributors\"\u003e\n      \u003cimg alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/bkrem/awesome-solidity\"\u003e\n    \u003c/a\u003e --\u003e\n    \u003ca href=\"http://makeapullrequest.com\"\u003e\n      \u003cimg alt=\"pull requests welcome badge\" src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat\"\u003e\n    \u003c/a\u003e\n\u003c!--     \u003ca href=\"https://gitcoin.co/grants/3371/awesome-solidity\"\u003e\n      \u003cimg alt=\"support via gitcoin badge\" src=\"https://img.shields.io/badge/Support%20via-GitCoin-purple\"\u003e\n    \u003c/a\u003e --\u003e\n  \u003c/p\u003e\n\n\u003cp align='center'\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/36774944/131478728-e00db522-424c-4f3f-8f26-753595057094.png' alt='screenshot' width=\"500\" height=\"300\" /\u003e\n\u003c/p\u003e  \n\u003c!--   \u003cp align=\"center\"\u003ePlease check the \u003ca href=\"CONTRIBUTING.md\"\u003econtribution guidelines\u003c/a\u003e for information on formatting and writing pull requests.\u003c/p\u003e\n   --\u003e\n\u003c/div\u003e\n\n### Resources 👇\n\nI. [Research Papers](https://github.com/iskanderandrews/awesome-soliidty-gas-optimization#i-research-papers)\n  - [Ethereum EVM Research Papers](https://github.com/iskanderandrews/awesome-solidity-gas-optimization/blob/master/README.md#ethereum-evm-research-papers)\n\nII. [Medium / Articles](https://github.com/iskanderandrews/awesome-soliidty-gas-optimization#medium--articles)\n\nIII. [Q\u0026A / StackOverflow](https://github.com/iskanderandrews/awesome-soliidty-gas-optimization#qa--stackoverflow)\n\nIV. [Video resources / YouTube](https://github.com/iskanderandrews/awesome-soliidty-gas-optimization#video-resources--youtube)\n\nV. [Smart-Contract](https://github.com/iskanderandrews/awesome-soliidty-gas-optimization#smart-contract)\n\n### I. Research Papers\n\n- MultiCall: A Transaction-batching Interpreter for Ethereum - 2021\nhttps://dl.acm.org/doi/pdf/10.1145/3457337.3457839\n\n- IEEE: Static Profiling and Optimization of Ethereum Smart Contracts Using Resource Analysis - 2021\nhttps://ieeexplore.ieee.org/abstract/document/9348894\n\n- Arxiv: Under-Optimized Smart Contracts Devour Your Money - 2020\nhttps://arxiv.org/pdf/1703.03994.pdf\n\n- IEEE: Design Patterns for Gas Optimization in Ethereum - 2020\nhttps://ieeexplore.ieee.org/abstract/document/9050163\n\n- GASOL: Gas Analysis and Optimization for Ethereum Smart Contracts - 2020\nhttp://costa.fdi.ucm.es/papers/costa/AlbertCGRR20.pdf\n\n- Optimization of solidity smart contracts - 2020\nhttps://repositum.tuwien.at/handle/20.500.12708/1428\n\n- A Gas-Efficient Superlight Bitcoin Client in Solidity - 2020\nhttps://dl.acm.org/doi/abs/10.1145/3419614.3423255\n\n- Arxiv: Profiling Gas Leaks in Solidity Smart Contracts - 2020\nhttps://arxiv.org/abs/2008.05449\n\n- ABCDE—agile block chain DApp engineering - 2020\nhttps://www.sciencedirect.com/science/article/pii/S2096720920300026\n\n- IEEE: Transformation of Contract Descriptions in a Domain Specific Language to Solidity Assembly - 2020\nhttps://ieeexplore.ieee.org/abstract/document/9325490\n\n- Developing Cost-Effective Blockchain-Powered Applications: A Case Study of the Gas Usage of Smart Contract Transactions in the Ethereum Blockchain Platform - 2020\nhttp://www.cse.yorku.ca/~zmjiang/publications/tosem2020_zarir.pdf\n\n- Cost Minimization of Solidity Smart Contracts on Blockchain Systems - 2020\nhttps://www.koreascience.or.kr/article/JAKO202019550426714.page\n\n- IEEE: GasChecker: Scalable Analysis for Discovering Gas-Inefficient Smart Contracts - 2020\nhttps://ieeexplore.ieee.org/abstract/document/9026761\n\n- IEEE: Research on Smart Contract Optimization Method on Blockchain - 2019\nhttps://ieeexplore.ieee.org/abstract/document/8832276\n\n- Springer: Synthesis of Super-Optimized Smart Contracts Using Max-SMT - 2020\nhttps://link.springer.com/chapter/10.1007/978-3-030-53288-8_10\n\n- Characterizing Efficiency Optimizations in Solidity Smart Contracts - 2020\nhttps://dsg.tuwien.ac.at/team/sschulte/paper/bc2020.pdf\n\n- A Quantitative Analysis of the Ethereum Fee Market: How Storing Gas Can Result in More Predictable Prices. \nhttps://wwz.unibas.ch/fileadmin/user_upload/wwz/00_Professuren/Schaer_DLTFintech/Lehre/Teaching_Page/Nadler_MasterThesis_2020-1_copy.pdf\n\n- Springer: Studying gas exceptions in blockchain-based cloud applications - 2020\nhttps://journalofcloudcomputing.springeropen.com/articles/10.1186/s13677-020-00176-9\n\n- IEEE: Characterizing Efficiency Optimizations in Solidity Smart Contracts - 2019\nhttps://ieeexplore.ieee.org/abstract/document/9284779\n\n- Springer: Computing Exact Worst-Case Gas Consumption for Smart Contracts - 2018\nhttps://link.springer.com/chapter/10.1007/978-3-030-03427-6_33\n\n- Gas Cost Analysis for Ethereum Smart Contracts - 2018\nhttps://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/312914/1/TMeineOrdnerMaster-ArbeitenHS18Signer_Christopher.pdf\n\n- Springer: Optimized Execution of Business Processes on Blockchain - 2017\nhttps://link.springer.com/chapter/10.1007/978-3-319-65000-5_8\n\n- Saving Deployment Costs of Smart Contracts by Eliminating Gaswasteful Patterns - 2017\nhttp://article.nadiapub.com/IJGDC/vol10_no12/6.pdf\n\n#### Ethereum EVM Research Papers\n- EVM Opcode Gas Costs\nhttps://github.com/djrtwo/evm-opcode-gas-costs\n\n\n### II. Medium / Articles\n\n- Basics of Smart Contract Gas Optimization with Solidity - 2022 \nhttps://eip2535diamonds.substack.com/p/smart-contract-gas-optimization-with\n\n- How EIP2535 Diamonds Reduces Gas Costs for Smart Contract Systems - 2022 \n(Thanks to @mudgen, https://github.com/iskdrews/awesome-solidity-gas-optimization/issues/1)\nhttps://eip2535diamonds.substack.com/p/how-eip2535-diamonds-reduces-gas\n\n- How to Save Gas in your Ethereum Smart Contracts - 2021\nhttps://marduc812.com/2021/04/08/how-to-save-gas-in-your-ethereum-smart-contracts/\n\n- Solidity Quick Tip: Efficiently Swap Two Variables - 2021\nhttps://blog.oliverjumpertz.dev/solidity-quick-tip-efficiently-swap-two-variables\n\n- How to Write Smart Contracts That Optimize Gas Spent on Ethereum - Medium\nhttps://betterprogramming.pub/how-to-write-smart-contracts-that-optimize-gas-spent-on-ethereum-30b5e9c5db85\n\n- Optimizing your Solidity contract’s gas usage - Medium\nhttps://medium.com/coinmonks/optimizing-your-solidity-contracts-gas-usage-9d65334db6c7\n\n- Solidity gas optimization tips - Article\nhttps://mudit.blog/solidity-gas-optimization-tips/\n\n- Storage vs. Memory vs. Stack in Solidity \u0026 Ethereum\nhttps://dlt-repo.net/storage-vs-memory-vs-stack-in-solidity-ethereum/\n\n- 10 solidity code patterns that optimize the gas utilization of Ethereum smart contracts - 2019\nhttps://blog.krybot.com/a?ID=01600-56f06856-e060-4787-93a3-0ffb088cd88f\n\n- How to reduce gas cost in Solidity - 2019\nhttps://medium.com/layerx/how-to-reduce-gas-cost-in-solidity-f2e5321e0395\n\n- Gas Optimization in Solidity Part I: Variables - 2019 https://medium.com/coinmonks/gas-optimization-in-solidity-part-i-variables-9d5775e43dde\n\n- How to optimize gas cost in a Solidity smart contract? 6 tips - 2019\nhttps://eattheblocks.com/how-to-optimize-gas-cost-in-a-solidity-smart-contract-6-tips/\n\n- Solidity tips and tricks to save gas and reduce bytecode size - 2019\nhttps://blog.polymath.network/solidity-tips-and-tricks-to-save-gas-and-reduce-bytecode-size-c44580b218e6\n\n- Save Gas with Packing in Solidity - 2019\nhttps://www.maxgrok.com/posts/one-hundred-and-nineth-post\n\n- The million dollar question (RU) - 2018\nhttps://habr.com/ru/company/raiffeisenbank/blog/354122/\n\n- Solidity gas optimization - small int types and structs - 2018\nhttps://danielszego.blogspot.com/2018/01/solidity-gas-optimization-small-int.html\n\n- 8 Ways of Reducing the Gas Consumption of your Smart Contracts - 2018\nhttps://medium.com/coinmonks/8-ways-of-reducing-the-gas-consumption-of-your-smart-contracts-9a506b339c0a\n\n- How to Reduce Solidity Gas Costs Full Guide - 2022\nhttps://moralis.io/how-to-reduce-solidity-gas-costs-full-guide/\n\n- A Collection of Gas Optimisation Tricks - 2022\nhttps://forum.openzeppelin.com/t/a-collection-of-gas-optimisation-tricks/19966\n\n- Solidity Gas Optimizations Cheat Sheet - 2022\nhttps://0xmacro.com/blog/solidity-gas-optimizations-cheat-sheet/\n\n### III. Q\u0026A / StackOverflow\n\n- How to write an optimized (gas-cost) smart contract? - StackOverflow\nhttps://ethereum.stackexchange.com/questions/28813/how-to-write-an-optimized-gas-cost-smart-contract\n\n- Why does uint8 cost more gas than uint256? - StackOverflow\nhttps://ethereum.stackexchange.com/questions/3067/why-does-uint8-cost-more-gas-than-uint256\n\n- Use string type or bytes32? - StackOverflow\nhttps://ethereum.stackexchange.com/questions/11556/use-string-type-or-bytes32\n\n- Integer types; createPerson function alternatives; Gas; Optimization; View v Pure functions; Non-iterable nature of mappings - 2020\nhttps://forum.ivanontech.com/t/integer-types-createperson-function-alternatives-gas-optimization-view-v-pure-functions-non-iterable-nature-of-mappings-by-jon-m/12169\n\n- What’s the best way to optimize the bytecode size of a contract? - 2019\nhttps://forum.openzeppelin.com/t/whats-the-best-way-to-optimize-the-bytecode-size-of-a-contract/981\n\n- Gas optimization for my smart contract? - 2017\nhttps://ethereum.stackexchange.com/questions/13472/gas-optimization-for-my-smart-contract\n\n### IV. Video resources / YouTube\n\n- EVM Basics — Macro Hackathons - 2022\nhttps://www.youtube.com/watch?v=LNU4JLo_KAA\n\n- Gas Golf | Solidity 0.8 - 2022\nhttps://www.youtube.com/watch?v=4r20M9Fr8lY\n\n- EVM Bytecode ABI Gas and Gas Price - 2021\nhttps://www.youtube.com/watch?v=HcOWNxL3Iy0\n\n- Simple Trick to Save Gas in Your Smart Contract - 2021\nhttps://www.youtube.com/watch?v=l2OxNQcb8e8\n\n- Storage, Memory and Calldata | Solidity 0.8\nhttps://www.youtube.com/watch?v=wOCIhzAuhgs\n\n- Simple Storage | Solidity 0.8\nhttps://www.youtube.com/watch?v=YNu4wH2DXoU\n\n- EVM: From Solidity to byte code, memory and storage - 2020\nhttps://www.youtube.com/watch?v=RxL_1AfV7N4\n\n- Three tips for optimizing gas - 2019\nhttps://blockbites.io/bites/bite2.html\n\n- Learn Solidity (0.5) - Gas and Gas Price - 2019\nhttps://www.youtube.com/watch?v=oTS9uxU6cAM\n\n- DAPPCON 2018: Solidity Dapp Optimization Gonçalo Sá (ConsenSys Diligence) - 2018\nhttps://www.youtube.com/watch?v=qwBkeJ84d2g\u0026t=68s\n\n- Less Gas, More Fun: Optimising Smart Contracts through Yul by Christian Reitwiessner (Devcon4) - 2018\nhttps://www.youtube.com/watch?v=VH4MgZDyZJU\n\n- Gas optimization in solidity: 10tips  by Julien Klepatch (EatTheBlocks) - 2019\nhttps://www.youtube.com/watch?v=PYilP2bjtwc\n\n### V. Smart-Contracts:\n- Playpen: is a set of modern, gas-optimized staking pool contracts - 2022\nhttps://github.com/ZeframLou/playpen\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xisk%2Fawesome-solidity-gas-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xisk%2Fawesome-solidity-gas-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xisk%2Fawesome-solidity-gas-optimization/lists"}