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

Remove flashloan receiver #207

Merged
merged 5 commits into from
Aug 2, 2023
Merged

Conversation

MathisGD
Copy link
Contributor

@MathisGD MathisGD commented Aug 1, 2023

Reasons for doing this:

  • uniformisation with callbacks, both logic and interfaces
  • removes one argument to the flashloan function and to the callback
  • it does not seem really useful to have this flexibility, as you need to auth the initial caller in the callback function

NB: an arbitrary from in transferFrom is a critical issue for slither.

Rubilmax
Rubilmax previously approved these changes Aug 1, 2023
@Rubilmax
Copy link
Collaborator

Rubilmax commented Aug 1, 2023

Features lost with this change:

  1. EOAs now need to trigger flash loans via callback contracts
  2. Flashloans can no longer be initiated in a delegatecall context to a different receiver

@MathisGD MathisGD marked this pull request as ready for review August 1, 2023 22:10
@MathisGD MathisGD self-assigned this Aug 1, 2023
Copy link
Contributor

@makcandrov makcandrov left a comment

Choose a reason for hiding this comment

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

I totally agree with the idea of harmonizing the callbacks. But imo the flashloan receiver could have been useful

Rubilmax
Rubilmax previously approved these changes Aug 2, 2023
MerlinEgalite
MerlinEgalite previously approved these changes Aug 2, 2023
Jean-Grimal
Jean-Grimal previously approved these changes Aug 2, 2023
src/interfaces/IBlueCallbacks.sol Outdated Show resolved Hide resolved
makcandrov
makcandrov previously approved these changes Aug 2, 2023
MerlinEgalite
MerlinEgalite previously approved these changes Aug 2, 2023
Rubilmax
Rubilmax previously approved these changes Aug 2, 2023
src/mocks/FlashBorrowerMock.sol Outdated Show resolved Hide resolved
@MathisGD MathisGD dismissed stale reviews from Rubilmax, MerlinEgalite, and makcandrov via c351c66 August 2, 2023 13:47
@MathisGD MathisGD requested a review from MerlinEgalite August 2, 2023 14:48
@MerlinEgalite MerlinEgalite merged commit 24ef6a8 into main Aug 2, 2023
@MerlinEgalite MerlinEgalite deleted the refactor/remove-flashloan-receiver branch August 2, 2023 14:56
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.

6 participants