nash-io / neo-ico-template

An ICO Template for NEO projects
GNU General Public License v3.0
117 stars 56 forks source link

Fake transfers for unchecked amounts #21

Closed belane closed 6 years ago

belane commented 6 years ago

When the "to" and "from" addresses are the same, the balance is not checked before return True.

This won’t produce any balance alteration but it would reflect transactions for amounts greater than the available funds.

If some software, third-party or API is watching these calls it can lead to a balance error.

I think is better to check the account balance before returning the value even for transfers to himself.