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 response #6

Merged
merged 49 commits into from
Sep 25, 2023
Merged

Audit response #6

merged 49 commits into from
Sep 25, 2023

Conversation

JaredBorders
Copy link
Contributor

@JaredBorders JaredBorders commented Sep 12, 2023

Audit Reponse

Omniscia Audit SMv3

EEN-01S: Illegible Numeric Value Representations
No change

EEN-02S
Inexistent Sanitization of Input Addresses
Addressed (commit hash: 6e872aa)

EEN-03S: Improper Invocations of EIP-20 transfer / transferFrom
No change: ERC-20 tokens used within the Engine are exclusively Synthetix synths which revert with the custom error InsufficientBalance when transfer or transferFrom is attempted by an address with an insufficient balance to satisfy the transfer.

COH-01M: Discrepancy of Type-Hashes
Addressed (commit hash: a1cd243)

EEN-01M: Inexistent Validation of Confidence Interval
Addressed (commit hash: 84d5fab)

EEN-02M: Inexistent Validation of Order Configuration
No change: It is the responsibility of the off-chain actor to specify correct conditional orders. Additional on-checks to ensure conditional orders "should either have a set of conditions OR a trustedExecutor but not both" is unnecessary.

EEN-03M: Potentially Insecure Account Creation Workflow
Addressed (commit hash: c375a80)
Create Account functionality removed

EEN-04M: Improperly Shared Nonce System
Addressed (commit hash: (9a60ac6)

EEN-05M: Potentially Insecure Order Consumption
Addressed (commit hash: 48d9a33)

SCL-01M: Usage of Experimental Library
Addressed (commit hash: ceb6d84)
Note the library was updated and is still being used to save gas.

ERC-01C: Specification of Abstract Contract
Addressed (commit hash: c375a80)
Create Account functionality removed

EEN-01C: Inefficient Memory Usage
Addressed (commit hash: 918e832)

EEN-02C: Inefficient if Structure
Addressed (commit hash: 0199a31)

EEN-03C: Non-Uniform Invocation Style
Addressed (commit hash: 8fe39f8)

EEN-04C: Redundant Ternary Operator
Addressed (commit hash: 21db288)

MLB-01C: Memory-Safe Optimization
No change

MLB-02C: Optimization of Absolute Value Evaluation
Addressed (commit hash: bdf2ee1)

Macro Audit SMv3

[H-1] Conditional orders can be blocked
Addressed (commit hash: (9a60ac6)

[H-2] Delegates are granted too high permissions
Addressed (commit hash: b4ddb7d)

[M-1] accountStats can be inaccurate
Addressed (commit hash: 9a60ac6)
Removed all account stats logic

[M-2] verifyConditions() can cause infinite loop consuming gas
Addressed (commit hash: 927bdd7)

[M-3] Users cannot cancel signed conditional orders
Addressed (commit hash: (9a60ac6)
See Engine.invalidateUnorderedNonces

[L-1] Invalid _CONDITIONAL_ORDER_TYPEHASH
Addressed (commit hash: a1cd243)

[L-2] Static calls can consume all gas
Addressed (commit hash: 927bdd7)

[Q-1] Inaccurate comments
Addressed (commit hash: 8191442)

[Q-2] ConditionalOrderHashLib not used with OrderDetails
Addressed (commit hash: 2718eab)

[G-1] Use bits to represent nonces
Addressed (commit hash: (9a60ac6)

[I-1] Conditional Orders may not execute, even if conditions are met
Addressed (commit hash: ec288ad)
Added documentation

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #6 (baeb576) into main (99f3dc5) will increase coverage by 36.50%.
The diff coverage is 90.38%.

@@             Coverage Diff             @@
##             main       #6       +/-   ##
===========================================
+ Coverage   36.36%   72.86%   +36.50%     
===========================================
  Files          21        5       -16     
  Lines         220      129       -91     
  Branches       26       26               
===========================================
+ Hits           80       94       +14     
+ Misses        135       28      -107     
- Partials        5        7        +2     
Files Coverage Δ
src/libraries/ConditionalOrderHashLib.sol 0.00% <ø> (ø)
src/libraries/MathLib.sol 0.00% <0.00%> (ø)
src/Engine.sol 90.62% <92.15%> (-0.41%) ⬇️

... and 13 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JaredBorders JaredBorders changed the title Omniscia audit response Audit response Sep 15, 2023
@JaredBorders JaredBorders merged commit e83bc79 into main Sep 25, 2023
5 checks passed
@JaredBorders JaredBorders deleted the omniscia-audit-response branch September 25, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants