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: Avoid actions with debt/coll zero #146

Merged
merged 1 commit into from
May 3, 2024

Conversation

bingen
Copy link
Collaborator

@bingen bingen commented May 2, 2024

Closes # 9

@bingen bingen self-assigned this May 2, 2024
Copy link
Collaborator

@danielattilasimon danielattilasimon left a comment

Choose a reason for hiding this comment

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

The change is okay but please don't close #9 with this! The issue explicitly says:

Refactor withdrawETHGainToTrove such that it doesn't use an internal function intended for borrowers.

This change does not address the core issue, which is:

It's somewhat hacky to use the internal function _adustTrove that's really intended for borrower operations

@bingen
Copy link
Collaborator Author

bingen commented May 3, 2024

The issue explicitly says: ...

Yes, I know, but I just disagree. That’s the proposed solution to the problem of burning 0 LUSD. But I don’t see a big difference between withdrawing ETH from SP to a Trove or using addColl, which uses that internal _adjustTrove function. Making moveETHGainToTrove not to use it would be an unnecessary code duplication in my opinion.

@bingen
Copy link
Collaborator Author

bingen commented May 3, 2024

Another thought I had while writing this PR was to just remove moveETHGainToTrove, and have it as a zapper. What do you think about that?

@bingen bingen merged commit 7c10422 into main May 3, 2024
6 of 7 checks passed
@danielattilasimon
Copy link
Collaborator

Another thought I had while writing this PR was to just remove moveETHGainToTrove, and have it as a zapper. What do you think about that?

Yes, that sounds better.

@danielattilasimon danielattilasimon deleted the refactor_withdrawETHGainToTrove branch May 6, 2024 08:11
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