Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reallocate by withdrawals + sink #5

Merged
merged 42 commits into from
Feb 16, 2024

Conversation

adhusson
Copy link
Contributor

@adhusson adhusson commented Feb 13, 2024

TODO

  • adapt tests

Based on @MathisGD's suggestion, reallocate by specifying:

  • A list of withdrawals as (market,amount) pairs
  • A "sink" market that will receive all the withdrawn liquidity

Notes:

  • reallocate has been renamed withdrawTo
  • You still need to call Morpho

Pros:

  • Less sensitive to asynchrony/frontrunning
  • Exact in assets

Cons:

  • Slightly more complex code
  • Less flexible than full reallocation array / full flows array

@adhusson adhusson changed the base branch from main to feat/flows-and-eth-fee February 13, 2024 15:51
@adhusson adhusson marked this pull request as ready for review February 13, 2024 17:49
src/PublicAllocator.sol Outdated Show resolved Hide resolved
src/PublicAllocator.sol Outdated Show resolved Hide resolved
src/PublicAllocator.sol Outdated Show resolved Hide resolved
src/libraries/EventsLib.sol Show resolved Hide resolved
src/libraries/EventsLib.sol Outdated Show resolved Hide resolved
src/PublicAllocator.sol Outdated Show resolved Hide resolved
src/PublicAllocator.sol Outdated Show resolved Hide resolved
@MathisGD MathisGD self-assigned this Feb 16, 2024
@MathisGD MathisGD mentioned this pull request Feb 16, 2024
MathisGD and others added 3 commits February 16, 2024 14:54
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
@MathisGD MathisGD merged commit e9bbf5e into feat/flows-and-eth-fee Feb 16, 2024
1 check passed
@MathisGD MathisGD deleted the feat/reallocate-by-flow branch February 16, 2024 14:03
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.

None yet

3 participants