Skip to content

Feat/clear bad debt#818

Merged
xklob merged 31 commits intodevelopfrom
feat/clear-bad-debt
May 31, 2022
Merged

Feat/clear bad debt#818
xklob merged 31 commits intodevelopfrom
feat/clear-bad-debt

Conversation

@xklob
Copy link
Contributor

@xklob xklob commented May 17, 2022

Provides a contract, FuseFixer.sol, that gives capabilities of paying back bad debt specifically for the exploiter.
The bad debt can be repaid over multiple transactions, or all at once.

Is not opinionated about how the contract gets its assets.

Todo: need to add tests for the "multiple transactions" path.
Todo: need to think about how this could be griefed, and preventions we might want to implement.

(note that we have a slippage parameter of sorts in two ways: first, by not sending too many assets to this contract; second, by using the individual-repay method and providing a maximum amount)

@xklob xklob requested a review from a team as a code owner May 17, 2022 20:21
@xklob xklob self-assigned this May 17, 2022
@xklob xklob linked an issue May 17, 2022 that may be closed by this pull request
Copy link
Contributor

@thomas-waite thomas-waite left a comment

Choose a reason for hiding this comment

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

Will have a think about attack vectors and edge cases, only have small comments so far. Added suggestion for the role

Main thing as you say is the tests for multiple transactions. I would probably break those out into an actual e2e test file rather than just do in the validate() function

Copy link
Contributor

@thomas-waite thomas-waite left a comment

Choose a reason for hiding this comment

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

My feedback was addressed + have reviewed the subsequently pushed commits

@xklob
Copy link
Contributor Author

xklob commented May 26, 2022

Deployed to 0xFE7547F583aAe1212e72e063Aac25057C06c4797

@xklob
Copy link
Contributor Author

xklob commented May 26, 2022

@xklob xklob merged commit 3390d2b into develop May 31, 2022
@xklob xklob deleted the feat/clear-bad-debt branch May 31, 2022 20:52
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.

Bad debt repayment proposal & code

5 participants

Comments