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

[OZ] H-01 #112

Merged
merged 1 commit into from
Jul 29, 2024
Merged

[OZ] H-01 #112

merged 1 commit into from
Jul 29, 2024

Conversation

junkim012
Copy link
Collaborator

H-01

  • On _transfer, when calculating the amount of normalizedBalance to transfer with supplyFactor, it now includes the accrued per-second interest rate in the supplyFactor.
  • Instead of directly querying the $._supplyFactor, it uses the supplyFactor view function which includes the "to-be-accrued" interest rate.
  • View function called rather than _accrueInterest for gas savings. The _accrueInterest MUST be called if the function changes the utilization rate of the pool, but _transfer does not.

@junkim012 junkim012 requested review from CarsonCase and jpick713 July 6, 2024 03:19
Copy link

[OZ] H-01

Generated at commit: a6b160172f7bb6b62c692e925394599efc637749

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
2
0
12
40
56
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

Copy link

@CarsonCase CarsonCase left a comment

Choose a reason for hiding this comment

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

Looks good. Like the use of supplyFactor() view function instead of accruing, was interested if just because _transfer() doesn't change utilization, means that it CAN'T under any circumstance but from what I can see that invariant holds. Would be neat to add to invariant tests however that no call to transfer() changes utilization rate

@junkim012 junkim012 merged commit 9a67318 into jun/oz-vault-upgrade-audit-merge Jul 29, 2024
5 of 6 checks passed
@junkim012 junkim012 deleted the jun/OZ-H-01 branch July 29, 2024 18:12
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.

3 participants