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

Audit fixes QS2 #60

Merged
merged 23 commits into from May 8, 2023
Merged

Audit fixes QS2 #60

merged 23 commits into from May 8, 2023

Conversation

amarinkovic
Copy link
Member

@amarinkovic amarinkovic commented Apr 18, 2023

This is a cumulative change set for all the fixes, done to address findings of the second Quantstamp audit.

  • QS-1 Arbitrary Actions Can Be Executed when Upgrading the Diamond Pattern [high]
  • QS-2 Entity Token Holders May Not Receive Future Dividends [high]
  • QS-3 Double-Counting of Dividend Payout Results in Capital Providers Not Being Able to Withdraw Dividends [high]
  • QS-4 More than the Premium Amount Can Be Spent when a Premium Is Paid [medium]
  • QS-5 Deterministically Generated Objectid Can Be Front-Run by Preselected Ids[medium]
  • QS-6 Incorrect Accounting of sysAdmins when Reassigning an Existing Admin Role[medium]
  • QS-7 Invalid Entity Update [medium]
  • QS-8 Id Aliasing Between Addresses and Associated Objectid [medium]
  • QS-9 Missing Input Validation[low]
  • QS-10 Lack of Alignment Between Commission Receivers & Stakeholders upon Policy Creation [low]
  • QS-11 Contract Owner Can Become System Admin [low]
  • QS-12 Insufficient Contract Pausability [low]
  • QS-13 Lack of Support for Inflationary Tokens [low]
  • QS-14 Adding Wrapped Participation Tokens as Supported External Tokens May Lead to Incorrect Accounting [low]
  • QS-15 Parent of an Object Can Be Overridden [low]
  • QS-16 Allowance Double-Spend Exploit [low]
  • QS-17 Mismatch Between Code and Role and Privilege Matrix [low]
  • QS-18 Gas Usage / Loop Concerns [low]
  • QS-19 Outdated Solidity Version [informational]
  • QS-20 Privileged Roles & Ownership [informational]
  • QS-21 Circular Chain of Assigners [informational]
  • QS-22 Application Monitoring Can Be Improved by Emitting More Events [informational]
  • QS-23 Entities Write Policies at a Collateralized Ratio [informational]
  • Code Documentation
  • Adherence to Best Practices

@amarinkovic amarinkovic changed the title Audit fixes - Quantstamp#2 Audit fixes - Quantstamp#2 [CU-861mnyqw6] Apr 18, 2023
@melks
Copy link

melks commented Apr 18, 2023

@amarinkovic amarinkovic changed the title Audit fixes - Quantstamp#2 [CU-861mnyqw6] Audit fixes - Quantstamp#2 Apr 18, 2023
@amarinkovic amarinkovic changed the title Audit fixes - Quantstamp#2 Audit fixes - Quantstamp #2 Apr 18, 2023
@kevin-fruitful kevin-fruitful force-pushed the audit-fixes branch 5 times, most recently from f0d02b7 to 0d0bdd4 Compare April 21, 2023 05:36
@kevin-fruitful kevin-fruitful force-pushed the audit-fixes branch 5 times, most recently from adfc107 to 5d71f5c Compare April 27, 2023 07:08
kevin-fruitful and others added 5 commits April 28, 2023 12:28
* fix: Insufficient Contract Pausability [NAY-12]

* fix: Adding Wrapped Participation Tokens as Supported External [NAY-14]

* fix(6): trading commission total BP

* fix(3): stakeholders arrays are sized properly

* fix(8): validate upgrade expiration period updates

* fix(9): validate upgrade cancellation

* fix(10): validate token name is not empty

* fix: formatting

* fix(5): minimum policy coverage time

---------

Co-authored-by: Kevin Park <kevin@fruitful.gg>
amarinkovic and others added 2 commits April 28, 2023 12:28
…istic matching in the match making algorithm. updated Nayms diamond and deployment scripts. [NAY-11]
amarinkovic and others added 2 commits April 28, 2023 14:00
* fix: unused imports, typos and redundant code

* fix: commission arrays length limit

* fix: index address in events

* fix: reuse variables

* fix: remove redundant struct

* chore: remove LibMeta.sol

* refactor: LibDiamond.initializeDiamondCut() throws error InitializationFunctionReverted instead of require msg

* docs: remove todo comments in code

* docs: improve explanation of UserFacet

* doc: fix some missing natspec comments

* doc: fix some typos

* fix: rename role updated event

* doc: clarify premium commission basis points

* fix: comment typos

* fix: policy event test

---------

Co-authored-by: Kevin Park <kevin@fruitful.gg>
@amarinkovic amarinkovic marked this pull request as ready for review April 28, 2023 12:19
@amarinkovic amarinkovic changed the title Audit fixes - Quantstamp #2 Audit fixes - Quantstamp 2 May 8, 2023
@amarinkovic amarinkovic merged commit eec4700 into main May 8, 2023
5 checks passed
@amarinkovic amarinkovic deleted the audit-fixes branch May 8, 2023 10:48
@amarinkovic amarinkovic changed the title Audit fixes - Quantstamp 2 Audit fixes QS 2 Apr 24, 2024
@amarinkovic amarinkovic changed the title Audit fixes QS 2 Audit fixes QS2 Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants