Ethereum community!

I'm currently working on developing a smart contract for a decentralized application (dApp) on the Ethereum blockchain. I'm concerned about optimizing gas usage to enhance efficiency and reduce costs for users interacting with the contract.

  1. Gas Optimization Techniques: What are the best practices for minimizing gas costs within smart contracts? Are there specific coding patterns or optimizations that can significantly reduce gas consumption?

  2. Storage vs. Computation: How should I balance between storage and computational costs in my smart contract design? Are there trade-offs to consider in terms of gas usage?

  3. Gas Estimation: What are reliable methods for accurately estimating gas costs before deploying a smart contract? How can I ensure that my estimations are as precise as possible?

I appreciate any insights or recommendations from experienced developers in the Ethereum community. Thank you!


1 Answer 1


This has indeed been answered in depth before as @Zartaj said it.

Gas optimisation is a very wide subject, with hundreds of ways to do so! Knowing the opcodes and the EVM will generally lead to have an instinctive understanding of what is cheaper or expensive.

As linked in the other post, here is the RareSkills book on optimisation. There is mostly all you might need in there.

There are also many other guides on Medium (although be careful articles there are not always fact checked and say false things).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.