mrgnlabs / marginfi-v2

Apache License 2.0
158 stars 66 forks source link

Flashloan Improvements #196

Open jkbpvsc opened 5 months ago

jkbpvsc commented 5 months ago
cxp-13 commented 1 week ago

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 commented 1 week ago

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

cxp-13 commented 1 week ago

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.