Skip to content

Instantly share code, notes, and snippets.

@yuriy77k
Last active August 13, 2018 11:11
Show Gist options
  • Save yuriy77k/7c90b5f25b3b4617d9e70cb3836503c6 to your computer and use it in GitHub Desktop.
Save yuriy77k/7c90b5f25b3b4617d9e70cb3836503c6 to your computer and use it in GitHub Desktop.
Gigzi smart contract security audit conclusion.

Gigzi smart contract security audit conclusion: bug fixing is necessary.

Critical issue:

  • Fees Avoidance. User can direct call transferFromAndCall or transferAndCall implemented in OpenZeppelin ERC827Token to transfer token without fee collection and possible manipulation of the reward since it the reward won't be updated.

Medium severity issues:

Pay attention:

Revealing audit reports:

@MrCrambo

Notes regarding the https://gist.github.com/MrCrambo/422384ecf5a215be81bad6c9b5c2b605 report.

  1. Time in the contract use seconds, not in "millis" and it did not affect on account balance. It used for estimate account reward in percent.

Not a security issue.

  1. All users who hold GZB tokens on their accounts will receive payments in GZG from the CA; a size of the payment will be proportional to the amount of GZB tokens on the account. Payments will be initiated by the CA at the end of a billing period, off-chain.

So estimate account reward in percent did not calculate directly in getAccountReward() function, but can calculate off-chain: rewardAccum * 100 / supplyTimeTotal

Not a security issue.

  1. Modifier restricted was correct and no need to change.

Not a security issue.

  1. Math operation in that lines can not be exploited for over- or under- flow, because it doesn't operate with user inputs.

Severity: low

Conclusion

You did not find critical issue. I strongly recommend that you review other audit reports and study the programming of contracts more thoroughly.

@RideSolo

Notes regarding the https://gist.github.com/RideSolo/55e07505b231f1cab7454d21ca8f8dc3 report.

I have only one note about the Gas Consumption. I agree that gas consumption optimization is very important, but it's not a security issue.

Conclusion

Your audit report is fine. You have done an in-depth analysis of the parent contracts from OpenZeppelin.

@alexo18

Notes regarding the https://gist.github.com/alexo18/f7014a8e941e81c98871b758196bdad7 report.

  1. rewardPeriod is time period in seconds and no need to any other conversion.

Not a security issue.

  1. Raw call to untrusted contract in MessageHelper.sol don't hurt Gigzi smart-contract, because it's not used. And it also has an appropriate comment.

  2. EVM doesn't support concurrent call to a function. Not a security issue.

  3. Flooding attack will have high cost attacker but without any profit. It can't affect to contract performance, but affect to blockchain size.

It is better to assign it low severity.

Conclusion

You did not find critical issue.

@gorbunovperm

Notes regarding the https://gist.github.com/gorbunovperm/0e0fa4e5a532a55672ed68649e51ccb4 report.

  1. Lost reward after burning tokens - better to assign it medium severity.

Conclusion

You did not find critical issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment