[go: up one dir, main page]

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

Failing reserves invariant after bucket take #1055

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

prateek105
Copy link
Contributor

Description

  • Some reserves invariant failed after bucketTake when reserves were too large (>~1e30). Added following failing reserves invariant regressions.
  • Fix failing regressions by updating reservesErrorMargin = (reservesAfterAction + reservesBeforeAction) / 1e16
  • Reset reservesErrorMargin before each handler calls in invariant.

Purpose

Impact

Tasks

  • Changes to protocol contracts are covered by unit tests executed by CI.
  • Protocol contract size limits have not been exceeded.
  • Gas consumption for impacted transactions have been compared with the target branch, and nontrivial changes cited in the Impact section above.
  • Scope labels have been assigned as appropriate.
  • Invariant tests have been manually executed as appropriate for the nature of the change.

@prateek105
Copy link
Contributor Author

PR #1054 needs to be merged, before merging this into develop.

* Reduce max pool debt in invariants to 1e32 and add loans settlement for kicked borrowers if pool debt is greater than max pool debt

* Fix collateral to pledge in erc20 invariants
Copy link
Contributor
@ith-harvey ith-harvey left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants