---
title: "Comment by ChiragMaliwal on \"The 2018 guide to writing (and testing) real world crowdsale contracts\" | Hashnode"
description: "Hello thanks for the good article. uint256 unsoldTokens = totalTokensForSale - alreadyMinted; if (unsoldTokens &gt; 0 ) { tokensForEcosystem = tokensForEcosyste"
url: "https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5af0a2cd5333a4e941f8d744"
---

[Discussion](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9)

Comment [The 2018 guide to writing (and testing) real world crowdsale contracts](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9)

[May 7, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5af0a2cd5333a4e941f8d744)

Hello thanks for the good article.

```
uint256 unsoldTokens = totalTokensForSale - alreadyMinted;
      if (unsoldTokens > 0) {
        tokensForEcosystem = tokensForEcosystem + unsoldTokens;
      }
```

Just because of these 3 lines I am getting error : `could potentially lead to re-entrancy vulnerability. <br/><i>Note:</i> Modifiers are currently not considered by this static analysis.`
