Skip to content

Commit e885add

Browse files
committed
repayAll on full rebalance delever
1 parent 451cd1b commit e885add

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

solidity/src/FCMVault.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ contract FCMVault is IFCMVault, ERC20, Ownable2Step, IMorphoFlashLoanCallback {
693693
// This case occurs when the swap pool returns a better price than the oracle, resulting in more loan tokens
694694
// than needed. We happily accept the favorable outcome, even if that means some loan tokens will get lost
695695
// as idle loan tokens in the vault.
696-
loanGot = currentDebt;
696+
return market().repayAll();
697697
}
698698
// slither-disable-next-line unused-return -> repay amount is known (repaid); Morpho reverts on failure
699699
if (loanGot > 0) market().repay(loanGot);

0 commit comments

Comments
 (0)