Back to Blog

Tips, tricks, and best approaches for developing decentralized applications – 0x09. [Blockchain Developers Meetup]

2 min read·Posted underMeet-ups

Updated on

Cover Image for Tips, tricks, and best approaches for developing decentralized applications – 0x09. [Blockchain Developers Meetup]

Last week we had our monthly blockchain developers meetup.

This time we were focusing more on the best approaches, tips and tricks for gas optimisation and best practices and architectures when developing decentralized applications.

Our focus was mostly on Ethereum’s Solidity and EVM since most people of our community are familiar with it.

Tips, tricks and best approaches when developing decentralized apps – 0x09 [Blockchain Developers Meetup]

Developers News

As usual we started with covering the news from the development space. We share them all over our channels and groups, but for those who do not follow regularly – this is what was new during the last month:

Tricks and tips

We talked a lot about gas optimization via variables packing, deployment gas optimization, and other interesting tricks. Here’s some of the tricks and tips we covered:

Any non-trivial contract will have errors in it. Your code must, therefore, be able to respond to bugs and vulnerabilities gracefully.


Prepare for failure

– Write clean, consistent good code (If you repeat certain operations often, make them a function)
– Move logic to Libraries if appropriate (They are published separately)
– Use modifiers for common checks
– Do as little as possible in the constructor

Lowering deployment cost
Solidity modifiers can be inefficient
Solidity Modifiers can be inefficient

When you add a function modifier, the code of that function is picked up and put in the function modifier in place of the _ symbol. This can also be understood as “The function modifiers are inlined”. In normal programming languages, inlining small code is more efficient without any real drawback but Solidity is no ordinary language. In Solidity, the maximum size of a contract is restricted to 24 KB

Modifiers can be inefficient

The recording will be available soon.

Resources

Have a project in mind?

Let's talk about what you're building.


Milen
About the author

Milen

Milen Radkov has experience building and delivering successful complex software systems and projects for both big enterprises and small startups. Being actively developing across different blockchain protocols, platforms and projects for the past 10 years, he has gained extensive experience in blockchain development, architectures, consensus algorithms and token economics. Milen is a well-known figure in the blockchain space.


More Stories

Cover Image for Discreet Log Contracts vs. EVM Oracle Networks: Two Visions for Trustless Finance

Discreet Log Contracts vs. EVM Oracle Networks: Two Visions for Trustless Finance

The Oracle Problem: Where Every Blockchain Hits a Wall A blockchain is, by design, a closed system. It can verify its own state with mathematical certainty – whether a transaction was signed correctly, whether a UTXO exists, whether a smart contract condition was met. What it cannot do natively is reach out and verify the […]

Read more
Cover Image for The zkEVM Race: Ethereum’s Most Difficult Engineering Problem

The zkEVM Race: Ethereum’s Most Difficult Engineering Problem

Every blockchain faces the same uncomfortable question eventually: what happens when more people want to use it than it can handle? For Ethereum, that question stopped being theoretical years ago. At peak congestion, a simple token swap can cost more in gas fees than the tokens themselves are worth. The network processes roughly 15 transactions […]

Read more