cryptocrystalio / cryptocrystal-bounty

10 stars 1 forks source link

Mine Crystal is burning _amount^2 tokens #12

Open janbro opened 6 years ago

janbro commented 6 years ago

In the following function, the amount of pickaxes being burned is _amount^2 since the burn function is being called within the for loop that iterates _amount times. This leads to the user burning much more pickaxes than the parameter spec indicates. Fix: Move the pickaxe.burn call outside of the for loop.

https://github.com/cryptocrystalio/cryptocrystal-bounty/blob/118cd744ffc2d8ff0682ef063843c4704133fab5/contracts/CryptoCrystal.sol#L352-L372

yudetamago commented 6 years ago

Thanks for reporting, @janbro!

As I mentioned earlier in #10, we will fix this bug.

minicoohei commented 6 years ago

Thanks for your participation,@janbro But our team has reviewed your submission and which is mentioned before ,so we cannot reward you for your report.

Please see the final leaderboard here.