From be498c72f5c3dff68eb9dd4968e8bd7e4b545f2c Mon Sep 17 00:00:00 2001 From: Denali Marsh Date: Thu, 4 Feb 2021 17:54:13 +0100 Subject: [PATCH] sync supply interest before ValidateBorrow (#798) --- x/hard/keeper/borrow.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/hard/keeper/borrow.go b/x/hard/keeper/borrow.go index ebb7fc3e..20e42e69 100644 --- a/x/hard/keeper/borrow.go +++ b/x/hard/keeper/borrow.go @@ -34,6 +34,7 @@ func (k Keeper) Borrow(ctx sdk.Context, borrower sdk.AccAddress, coins sdk.Coins k.BeforeBorrowModified(ctx, existingBorrow) } + k.SyncSupplyInterest(ctx, borrower) k.SyncBorrowInterest(ctx, borrower) // Validate borrow amount within user and protocol limits