Skip to content

Commit 5a4e5d7

Browse files
committed
liquidity protection - removed redundant code
1 parent d8eee11 commit 5a4e5d7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

contracts/liquidity-protection/LiquidityProtection.sol

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,6 @@ contract LiquidityProtection is ILiquidityProtection, Utils, Owned, ReentrancyGu
684684
// get the pool deficit
685685
Fraction memory poolDeficit = _poolDeficit(poolToken);
686686

687-
// no deficit
688-
if (poolDeficit.n == 0) {
689-
return (targetAmount, targetAmount);
690-
}
691-
692687
// calculate the available liquidity portion
693688
Fraction memory availablePortion = Fraction({ n: poolDeficit.d - poolDeficit.n, d: poolDeficit.d});
694689

@@ -707,12 +702,6 @@ contract LiquidityProtection is ILiquidityProtection, Utils, Owned, ReentrancyGu
707702
returns (uint256)
708703
{
709704
Fraction memory poolDeficit = _poolDeficit(poolToken);
710-
711-
// no deficit
712-
if (poolDeficit.n == 0) {
713-
return 0;
714-
}
715-
716705
return _mulDivF(PPM_RESOLUTION, poolDeficit.n, poolDeficit.d);
717706
}
718707

0 commit comments

Comments
 (0)