cryptocrystalio / cryptocrystal-bounty

10 stars 1 forks source link

Simplify variables assignment #4

Open pauliax opened 6 years ago

pauliax commented 6 years ago

Not a security issue but for readability and simplicity purposes some variables could make use of available Solidity expresions, for example:

uint256 public totalWeight = 210 * 1000 * 1000 * 1000 * 1000;
uint256 public secondsPerYear = 365 * 24 * 60 * 60;
uint256 public secondsPerDay = 24 * 60 * 60;

could be expressed as:

uint256 public totalWeight = 21 * 10**13;
uint256 public secondsPerYear = 1 years * 1 seconds;
uint256 public secondsPerDay = 1 days * 1 seconds;
yudetamago commented 6 years ago

Nice suggentions!

We forget using these notations(therefore wrote explations in comments...). Thanks @pauliax!

minicoohei commented 6 years ago

Thanks for your participation,@pauliax Our team has reviewed your submission, and we are pleased to reward you for your report.

Impact:Note Points: 25

Please see the final leaderboard here.