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

Flashloan Improvements #196

Open
jkbpvsc opened this issue Apr 10, 2024 · 3 comments
Open

Flashloan Improvements #196

jkbpvsc opened this issue Apr 10, 2024 · 3 comments

Comments

@jkbpvsc
Copy link
Member

jkbpvsc commented Apr 10, 2024

  • Defer deposit/borrow limit checks to the end_flashloan ix
  • Allow flashloans that improve account health -- allow flashloan if account is in bad health, but health health improves: health at end_flashloan > health at start_flashloan
@cxp-13
Copy link

cxp-13 commented Sep 23, 2024

where the code location with deposit/borrow limit checks. I don't find it on programs/marginfi/src/instructions/marginfi_account/borrow.rs lending_account_borrow function

@cxp-13
Copy link

cxp-13 commented Sep 25, 2024

Has this function been completed? I looked at the code and found that when borrowing, health monitoring is skipped.

@cxp-13
Copy link

cxp-13 commented Sep 25, 2024

Allow flashloans that improve account health -- allow flashloan if account is in bad health, but health health improves: health at end_flashloan > health at start_flashloan
I think this improvement has already been implemented in the code, because according to unit testing, repayment after borrowing meets this description.

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

No branches or pull requests

2 participants