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

fix: minor fixes to some informational findings #270

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

@@ -1304,6 +1303,11 @@ contract CreditManagerV3 is ICreditManagerV3, SanityCheckTrait, ReentrancyGuardT
return amount;
}

/// @dev Internal wrapper for `creditAccount.safeTransfer` call to redice contract size
Copy link

Choose a reason for hiding this comment

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

@lekhovitsky there's a typo here: redicereduce

@StErMi
Copy link

StErMi commented Aug 28, 2024

@lekhovitsky I think that the usage of the USE_SAFE_PRICES_FLAG flag (see issue https://github.com/spearbit-audits/review-gearbox/issues/108) should also be documented in the CreditFacadeV3 itself and not only on the PriceOracleV3.

The PriceOracleV3 is where the safe price behavior is configured, but it's the CreditFacadeV3 contract that will tell the oracle to use them or not.

Another issue about the safe price: with the PR #268 now also the "adapter logic" of the multicall could enable the USE_SAFE_PRICES_FLAG flag. This scenario is not explicitly documented in the PR and should be.

TLDR: Gearbox should:

  • Document the usage of the "Safe Price" mechanism also in the CreditFacadeV3 contract
  • Add to both the documentation of "Safe Price" in the CreditFacadeV3 and PriceOracleV3 contracts, the scenario enabling the USE_SAFE_PRICES_FLAG flag because of an external call to the adapter in multicall

@StErMi
Copy link

StErMi commented Aug 28, 2024

The code looks good and can be merged once the issues described in the above comments are integrated in this PR.

@lekhovitsky
Copy link
Collaborator Author

@StErMi Fixed a typo + added a comment about additional checks in _multicall's NatSpec in the latest commit

Base automatically changed from spearbit-8 to spearbit-fixes September 1, 2024 10:27
@lekhovitsky lekhovitsky merged commit 9e859e9 into spearbit-fixes Sep 1, 2024
3 checks passed
@lekhovitsky lekhovitsky deleted the spearbit-30-35-45-67-108 branch September 1, 2024 10:28
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.

2 participants