[midnight adapter] forceDeallocate by minting shares - #910
Draft
adhusson wants to merge 28 commits into
Draft
Conversation
forceDeallocate by minting shares
adhusson
commented
Aug 19, 2026
Signed-off-by: Adrien Husson <adhusson@gmail.com>
adhusson
commented
Aug 19, 2026
Signed-off-by: Adrien Husson <adhusson@gmail.com>
# Conflicts: # src/adapters/interfaces/IMidnightAdapter.sol # test/MidnightAdapterTest.sol
…ory under EIP-170
adhusson
force-pushed
the
takeless-force-deallocate
branch
from
August 20, 2026 10:05
9244224 to
7cdfdf7
Compare
…multiple fitting EIP-170
adhusson
force-pushed
the
takeless-force-deallocate
branch
from
August 20, 2026 11:04
7cdfdf7 to
e8bf768
Compare
…dates withdrawShares lowers vaultNetCredit without telling the vault, so updateDurationCaps must subtract what the vault actually holds on the duration ids, otherwise the unreported part stays on the dropped ids forever.
# Conflicts: # src/adapters/MidnightAdapter.sol # test/MidnightAdapterTest.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #786, if the obligation has a trading fee a user cannot do IKR without having the funds to pay the trading fee.
In this PR, IKR is free because the user gets shares in the adapter position. He is then safe from any vault attack and can sell his obligation shares later.
It also removes the question of whether to allow offer callbacks when a user force deallocates (because in the other PR, force deallocate triggers a take)