Replies: 2 comments
-
Of course, implementing this would have downstream effects in the |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm locking this discussion since this refactor idea has been implemented in d9d7b8e. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The redeem function requires users to pass an hToken amount.
This has caused an issue in the past, patched by @surbhiaudichya when she added an if block to handle the case where the division rounding errors resulted in receiving zero underlying in exchange for some non-zero hToken amount:
hifi/packages/protocol/contracts/core/hToken/HToken.sol
Lines 166 to 169 in 3263246
Wouldn't it be better if we asked users to pass an underlying amount instead? That way, there would be no rounding errors. There will remain a bit of dust in the users' accounts, but that's fine, since it's not debt and it doesn't interfere with the liquidator bot.
Beta Was this translation helpful? Give feedback.
All reactions