Replies: 1 comment 2 replies
-
Hey @Podziuu, This seems like a good approach. We usually want our invariant test suite to break our protocol in a way that we don't foresee, so we should write the invariant test suite to prevent all reverts we know of. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
While writing fuzz tests for the Stablecoin project, I discovered an edge case where the
redeemCollateral
function reverts due to the user’s health factor being broken. Upon investigation, I found that the user had minted some coins, and thebound
function selected almost the maximum amount to redeem collateral. This caused the revert, which is expected behavior.To handle this, I modified the
redeemCollateral
function to pass all cases. Here is the updated function:Is this a good approach, or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions