Skip to content

Commit

Permalink
fix: Fix liquidityAdded in BridgeLogic backUnbacked
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Sep 21, 2021
1 parent 20d7c86 commit 68764ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/protocol/libraries/logic/BridgeLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ library BridgeLogic {
uint256 totalFee = (backingAmount < amount) ? fee + (amount - backingAmount) : fee;

reserve.cumulateToLiquidityIndex(IERC20(reserve.aTokenAddress).totalSupply(), totalFee);
reserve.updateInterestRates(reserveCache, asset, 0, 0, backingAmount, 0);
reserve.updateInterestRates(reserveCache, asset, 0, 0, amount + fee, 0);
reserve.unbacked = reserve.unbacked - backingAmount;

IERC20(asset).safeTransferFrom(msg.sender, reserveCache.aTokenAddress, amount + fee);
Expand Down

0 comments on commit 68764ee

Please sign in to comment.