Skip to content

Instantly share code, notes, and snippets.

@yuriy77k
Forked from RideSolo/ETC_P3C_audit_report.md
Created August 27, 2018 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriy77k/4046d684441080fe1b312e631512123e to your computer and use it in GitHub Desktop.
Save yuriy77k/4046d684441080fe1b312e631512123e to your computer and use it in GitHub Desktop.

P3C Project Audit Report.

1. Summary

This document is a security audit report performed by RideSolo, where P3C Project has been reviewed.

P3C.io is a game that models Universal Basic Income. The rules of the game are simple:

  • You buy into the contract by purchasing tokens, every token purchased increases the token price by +0.00000001 ETC.
  • 10% of what you spend to buy the token gets distributed proportionally to all other token holders.
  • When you sell your token, you get back ETC at the specified price, and the global price per token goes down by -0.00000001 ETC.
  • 10% of what you would get back for the sale is distributed to all other token holders proportionally.
  • When a user uses your Masternode link to buy tokens, 33% of what would have been distributed to the community gets given directly to you in the form of dividends.

For more details check P3C wiki for more details.

While auditing, many aspects of the smart contracts were taken into account:

  • Solidity code errors.
  • Logical erros.
  • Algorithms used for conversion (tokens to ethereum).
  • Known exploits and potential weak paterns.

2. In scope

  • p3c.sol github commit hash f981172a054680614ddecb270616922e00352a83.

3. Findings

1 issues were reported including:

  • 1 low severity issues.

3.1. Known Issue of ERC20 Standard

Severity: low

Description

This issue is just a reminder about ERC20 Tokens lack of transaction handling, that can cause tokens loss. In the case of P3C contract, tokens can be accidentally sent to 0x0 address (no requirement is set to prevent it) or to a contract address not developed with the purpose of handling ERC20 tokens.

4. Conclusion

The audit, conducted on P3C contract, concluded that the contract is safe to be used. Graphical analysis and the definition domains of the functions used for conversion (tokens to ether and ether to tokens) showed positive results. However, for better analysis the contract developers should provide the community with a white paper describing every aspect of the contract especial the conversion algorithms.

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