Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #474 -- Added MixedAccounting to general/build/smart-contracts/contract-security #574

Merged
merged 4 commits into from
May 11, 2024

Conversation

jackleeio
Copy link
Contributor

@jackleeio jackleeio commented May 8, 2024

Pre-flight checklist


This change is Reviewable

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
conflux-documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 8:23am

@darwintree darwintree added the external contributor This label marks the issues connected to Dework label May 9, 2024
Copy link
Collaborator

@darwintree darwintree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the content is generally good. Here are some questions and suggestions

  1. Is the title mixed accounting not a general term? If not, I think the title shall be altered to reflect the article content appropriately, for example, balance accounting.
  2. The mixed acocunting would only result in actual balance greater than the balance as local state variable, and this would not bring about securtiy issues. This idea is already implicitly conveyed in the article. But I would recommend explicitly stating it and then highlight the security issues result from the incorrect assumptions rather than the unexpected more balance itself.
  3. (Optional) There are some handler functions for ERCxxx tokens, e.g. onERC20Recieved, onERC721Received. These handler can be mentioned in the article body.

Copy link
Collaborator

@darwintree darwintree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the title stays unchanged. Is this a specific term or how about your idea about current title? We can discuss it here

@jackleeio
Copy link
Contributor Author

mixed accounting is not a specific term. I want to express that mixing two accounting methods in a contract will bring some potential security issues, so I think it is better to use mixed accounting than balance accounting.

@darwintree
Copy link
Collaborator

mixed accounting is not a specific term. I want to express that mixing two accounting methods in a contract will bring some potential security issues, so I think it is better to use mixed accounting than balance accounting.

From my perspective, at least the title would let reader have a basic concept about the article content. As for mixed accounting, readers would not know or expect what the article is about. It's ok not to adobt the proposed example balance accounting but I don't think mixed accounting is a good title

@darwintree darwintree merged commit 76915f3 into Conflux-Chain:main May 11, 2024
2 checks passed
@jackleeio jackleeio requested a review from darwintree May 11, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external contributor This label marks the issues connected to Dework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants