Skip to content

Commit

Permalink
tests: simplify withdrawal logic in tests
Browse files Browse the repository at this point in the history
given the fix in f2ca1be it's now possible to have broader fuzzing in stateful testing
  • Loading branch information
AlbertoCentonze committed Feb 4, 2025
1 parent 26d5ee0 commit 8621f90
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/stateful/test_stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,8 @@ def remove_liquidity_one_coin_rule(self, data, coin_idx: int):
# TODO check these two conditions
max_withdraw = 0.3 if depositor_ratio > 0.25 else 1

min_withdraw = 0.1 if depositor_balance >= 1e13 else 0.01

# we draw a percentage of the depositor balance to withdraw
percentage = data.draw(floats(min_value=min_withdraw, max_value=max_withdraw))
percentage = data.draw(floats(min_value=0.01, max_value=max_withdraw))

note(
"removing {:.2e} lp tokens ".format(amount_withdrawn := percentage * depositor_balance)
Expand Down

0 comments on commit 8621f90

Please sign in to comment.