ux: withdraw return pending fee decrease#974
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb8d8cdb3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This reverts commit eb8d8cd.
MathisGD
left a comment
There was a problem hiding this comment.
why shouldn't take return the pendingFee deltas?
should liquidate return the badDebt?
Bad debt unrelated to credit but I can add it. For deltas i thought i was too misleading due to reentrancy, if you update using just the value before + the delta you can get it wrong. |
|
this is what it looks like wdyt? #1005 |
Goal: if the caller knows an old value of a user's
credit(or postmaturity credit:credit - pendingFee) he can always doand know the new credit (or postmaturity credit) + the part of the (postmaturity) credit change that was due to a loss.
Before this PR, it was only possible by doing 2 additional reads after the last call (or recreating the pending fee formula).
corresponding thread