Conclusion

Before formal verification or code coverage, clean code should be the first line of defense. Otherwise, logical flaws and vulnerabilities will have far more places to hide and go unnoticed to the eyes of a reviewer.

It might take a few iterations to achieve and using modifiers won’t magically make your code legible. But when used with care, they become a powerful tool to tame complexity and leverage reusability, making your code cleaner and safer.

Thiago Delgado is a software developer who loves Solidity, JavaScript, and open-source. Based at São Paulo, Brazil.

Fell in love at first sight with Colony and Ethereum, since then, left his cubicle behind and never looked back.