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

Zellic audit #2 feedback #199

Merged
merged 28 commits into from
Apr 4, 2023
Merged

Zellic audit #2 feedback #199

merged 28 commits into from
Apr 4, 2023

Conversation

neodaoist
Copy link
Contributor

@neodaoist neodaoist commented Mar 31, 2023

  • Semantic
  • Syntactic
    • Rename OptionSettlementEngine to ValoremOptionsClearinghouse
    • Bump copyright year
    • Clarify and fix typos on few comments
    • Add ASCII art and top-line NatSpec to IValoremOptionsClearinghouse interface
    • Update trust model document to reflect the up-to-date implementation
  • Deployment scripts
    • Support deploying to deterministic addresses
  • CI
    • Re-enable integration tests
    • Exclude non-Clearinghouse tests from coverage report

Note: you can press a to toggle check annotations on/off

@neodaoist neodaoist changed the title Audit fixes 2 [WIP] Zellic audit #2 feedback Mar 31, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2023

Codecov Report

Merging #199 (b7d28e2) into master (f085ad0) will increase coverage by 7.97%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   91.22%   99.20%   +7.97%     
==========================================
  Files           2        1       -1     
  Lines         376      250     -126     
  Branches       57       41      -16     
==========================================
- Hits          343      248      -95     
+ Misses         27        0      -27     
+ Partials        6        2       -4     
Impacted Files Coverage Δ
src/ValoremOptionsClearinghouse.sol 99.20% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@neodaoist neodaoist changed the title [WIP] Zellic audit #2 feedback Zellic audit #2 feedback Apr 4, 2023
@neodaoist neodaoist marked this pull request as ready for review April 4, 2023 00:33
emit OptionsWritten(encodedOptionId, msg.sender, tokenId, amount);
emit BucketWrittenInto(encodedOptionId, tokenId, bucketIndex, amount);
Copy link
Contributor

Choose a reason for hiding this comment

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

is this part of the feedback? I recall discussing but can't recall outcome of the discussion re:exposing the bucket concept via events. Feel free to resolve if we've already had this talk. but first take is that this seems orthogonal to the offered feedback and also seems like it exposes internals unnecessarily. again, could be forgetting a discussion we had

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we needed it for constructing claim state on the subgraph

amountPresentlyExercised = amount;
amount = 0;
}
bucketInfo.amountExercised += amountPresentlyExercised;

emit BucketAssignedExercise(optionId, bucketIndex, amountPresentlyExercised);
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this is the line that addresses offline accounting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, but without the BucketWrittenInto event, an off-chain actor won't be able to make heads or tails of what this event means. They need to know how many options, for each claim/index, are being written into the buckets to support off-chain claim accounting.

Copy link
Contributor

@Flip-Liquid Flip-Liquid left a comment

Choose a reason for hiding this comment

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

@neodaoist please review the comment I left in the impl file; feel free to resolve it if we've already had that discussion.

other than that, it seems like the description of the PR is slightly off; the seed update is not included in the delta for this PR

@0xAlcibiades
Copy link
Member

@neodaoist please review the comment I left in the impl file; feel free to resolve it if we've already had that discussion.

other than that, it seems like the description of the PR is slightly off; the seed update is not included in the delta for this PR

They should be.

@neodaoist
Copy link
Contributor Author

@neodaoist please review the comment I left in the impl file; feel free to resolve it if we've already had that discussion.

other than that, it seems like the description of the PR is slightly off; the seed update is not included in the delta for this PR

https://github.com/valorem-labs-inc/valorem-core/pull/199/files#diff-033680dc4cc50d115cdec7fe97c8be2fcf62aacef3c4b50b7c9979c08ad0027fL813

@0xAlcibiades 0xAlcibiades merged commit 30f1778 into master Apr 4, 2023
@0xAlcibiades 0xAlcibiades deleted the audit-fixes-2 branch April 4, 2023 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants