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

Healthiness preservation #522

Closed
wants to merge 7 commits into from
Closed

Healthiness preservation #522

wants to merge 7 commits into from

Conversation

QGarchery
Copy link
Contributor

HEAVILY inspired from this gist, thanks @daejunpark !

@QGarchery QGarchery self-assigned this Oct 8, 2023
Copy link
Collaborator

@Rubilmax Rubilmax left a comment

Choose a reason for hiding this comment

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

I think it can be refactored to inherit from existing invariant tests handlers (so we have less redundant code) by separating the current invariant tests into 2 layers: one with the handlers, one other with existing invariant tests. Yours should then inherit the handlers layer and it should save at least a few lines of code

Another thing: there already exists a src/mocks folder for hardhat and forge tests (required to be in src by hardhat)

@QGarchery
Copy link
Contributor Author

I think it can be refactored to inherit from existing invariant tests handlers (so we have less redundant code) by separating the current invariant tests into 2 layers: one with the handlers, one other with existing invariant tests. Yours should then inherit the handlers layer and it should save at least a few lines of code

Another thing: there already exists a src/mocks folder for hardhat and forge tests (required to be in src by hardhat)

Yep, trying to do all of that but I am facing unexpected errors where the rate is not taken into account. I'll put it as ready for review when I have resolved those issues

@QGarchery
Copy link
Contributor Author

Replaced by #598 because it's simpler and it gives an computation to ensure that your loan is safe for a period elapsed

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