2022-06-17
3221
#blockchain
MacBobby Chibuzor
119345
Jun 17, 2022 â‹… 11 min read

Smart contract development: Common mistakes to avoid

MacBobby Chibuzor Go, Solidity, and Haskell developer interested in the cloud native world and blockchain technology. A fanatic for technical writing and open source contribution.

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 min read
View all posts

3 Replies to "Smart contract development: Common mistakes to avoid"

  1. Thanks for the good overview, although I cannot quite get the race conditions example. In smart contracts you cannot call anything simultaniously, Transactions and functions calls are atomic, so you cannot put the transfer call within the withdrawal call. Once withdrawal finishes the balance is updated. Please, let me know if I am wrong

  2. It’s somewhat concurrent. The withdrawBalance function starts, then in-between, the transfer function is run. When the transfer function ends, the withdrawBalance function continues and then end. Because the withdrawBalance function hasn’t updated the state, it could give the user more than the coin/money.

    Liken it to running a function inside the main function in Rust or Go.

  3. This insightful article highlights common mistakes to avoid in smart contract development – it reinforces the importance of metaverse training to ensure robust and secure implementations.

Leave a Reply