ebtc-protocol / ebtc

GNU General Public License v3.0
56 stars 25 forks source link

Enforcing 1000 wei min change #747

Closed wtj2021 closed 11 months ago

dapp-whisperer commented 11 months ago

Review Notes (WIP)

elegantly adapts checks for nonzero values to minimum values

_requireNonZeroDebtChange → _requireMinDebtChange
_requireNonZeroAdjustment → _requireMinAdjustment
_requireNonZeroDebt -> _requireMinDebt

error messages adapt to new reality

Open

Adjust

Test Change Notes

Introduces constants for new error message in fixture

confirms revert w/ correct error message, with 1 wei changes in-line in some existing tests

should confirm that all values <1000 result in revert via fuzz tests when complete

dapp-whisperer commented 11 months ago

Redemption Spec

Gracefully skip partials when CDP has < MIN_CHANGE debt remaining, similar to min coll check.

image
wtj2021 commented 11 months ago

medusa coverage report https://drive.google.com/file/d/1lSy8wQWgwQK7RlBXSkprNnSGufUmTvVu/view?usp=drive_link