Skip to content

Commit

Permalink
fix relative check
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Nov 16, 2024
1 parent 8337717 commit 94c1c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agent0/hyperfuzz/system_fuzz/invariant_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _check_negative_interest(interface: HyperdriveReadInterface, pool_state: Poo
else:
paused_str = "unpaused"
# relative check to see if the rate went down by a lot
if previous_vault_share_price * NEGATIVE_INTEREST_RTOL <= current_vault_share_price:
if previous_vault_share_price * (FixedPoint(1) - NEGATIVE_INTEREST_RTOL) >= current_vault_share_price:
log_level = logging.CRITICAL
failed = True
exception_data["invariance_check:current_vault_share_price"] = current_vault_share_price
Expand Down

0 comments on commit 94c1c53

Please sign in to comment.