diff --git a/tests/boa/unitary/pool/test_exchange.py b/tests/boa/unitary/pool/test_exchange.py index c2488c1..f7906aa 100644 --- a/tests/boa/unitary/pool/test_exchange.py +++ b/tests/boa/unitary/pool/test_exchange.py @@ -111,56 +111,6 @@ def test_exchange_received_success( assert -d_balance_j == measured_j -@given( - amount=strategy( - "uint256", min_value=10**10, max_value=2 * 10**6 * 10**18 - ), # Can be more than we have - i=strategy("uint", min_value=0, max_value=3), - j=strategy("uint", min_value=0, max_value=3), -) -@settings(**SETTINGS) -def test_exchange_received_send_extra( - swap_with_deposit, - views_contract, - coins, - user, - amount, - i, - j, -): - - if i == j or i > 2 or j > 2: - - return - - amount = amount * 10**18 // INITIAL_PRICES[i] - mint_for_testing(coins[i], user, amount + 1) # <--- mint 1 wei extra - - calculated = views_contract.get_dy(i, j, amount, swap_with_deposit) - - measured_i = coins[i].balanceOf(user) - measured_j = coins[j].balanceOf(user) - d_balance_i = swap_with_deposit.balances(i) - d_balance_j = swap_with_deposit.balances(j) - - with boa.env.prank(user): - coins[i].transfer(swap_with_deposit, amount + 1) # <--- send extra - swap_with_deposit.exchange_received( - i, j, amount, int(0.999 * calculated), user - ) - - measured_i -= coins[i].balanceOf(user) - measured_j = coins[j].balanceOf(user) - measured_j - d_balance_i = swap_with_deposit.balances(i) - d_balance_i - d_balance_j = swap_with_deposit.balances(j) - d_balance_j - - assert amount == measured_i - 1 # <--- we sent 1 wei extra - assert calculated == measured_j - - assert d_balance_i == amount + 1 # <--- we sent 1 wei extra - assert -d_balance_j == measured_j - - @given( amount=strategy( "uint256", min_value=10**10, max_value=2 * 10**6 * 10**18