Skip to content

ux: withdraw return pending fee decrease#974

Open
adhusson wants to merge 3 commits into
mainfrom
return-more
Open

ux: withdraw return pending fee decrease#974
adhusson wants to merge 3 commits into
mainfrom
return-more

Conversation

@adhusson
Copy link
Copy Markdown
Contributor

@adhusson adhusson commented Jun 3, 2026

Goal: if the caller knows an old value of a user's credit (or postmaturity credit: credit - pendingFee) he can always do

(...) = updatePosition(lender); 
(...) = withdraw();

and 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).

@adhusson adhusson changed the title more return values ux: more return values Jun 3, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/Midnight.sol Outdated
@adhusson adhusson changed the title ux: more return values ux: withdraw return pending fee decrease Jun 3, 2026
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.

1 participant