Skip to content

Commit

Permalink
Add invariant check to test_removeLiquidity_fuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
publiuss committed May 17, 2023
1 parent 39ea396 commit f5d14eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/Well.RemoveLiquidity.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ contract WellRemoveLiquidityTest is LiquidityHelper {
(before, action) = beforeRemoveLiquidity(action);
well.removeLiquidity(lpAmountIn, amounts, user, type(uint).max);
afterRemoveLiquidity(before, action);

assertLe(
well.totalSupply(),
ConstantProduct2(wellFunction.target).calcLpTokenSupply(well.getReserves(), wellFunction.data)
);
}

/// @dev Fuzz test: UNEQUAL token reserves, BALANCED removal
Expand Down

0 comments on commit f5d14eb

Please sign in to comment.