agent0.hyperfuzz.unit_fuzz ========================== .. py:module:: agent0.hyperfuzz.unit_fuzz .. autoapi-nested-parse:: Shared functions for interactive fuzz testing. .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/agent0/hyperfuzz/unit_fuzz/fuzz_long_short_maturity_values/index /autoapi/agent0/hyperfuzz/unit_fuzz/fuzz_path_independence/index /autoapi/agent0/hyperfuzz/unit_fuzz/fuzz_present_value/index /autoapi/agent0/hyperfuzz/unit_fuzz/fuzz_profit_check/index /autoapi/agent0/hyperfuzz/unit_fuzz/helpers/index Functions --------- .. autoapisummary:: agent0.hyperfuzz.unit_fuzz.fuzz_long_short_maturity_values agent0.hyperfuzz.unit_fuzz.fuzz_path_independence agent0.hyperfuzz.unit_fuzz.fuzz_present_value agent0.hyperfuzz.unit_fuzz.fuzz_profit_check Package Contents ---------------- .. py:function:: fuzz_long_short_maturity_values(num_trades: int, long_maturity_vals_epsilon: float, short_maturity_vals_epsilon: float, chain_config: agent0.core.hyperdrive.interactive.LocalChain.Config, steth: bool = False, pause_on_fail: bool = False) Does fuzzy invariant checks on closing longs and shorts past maturity. :param num_trades: Number of trades to perform during the fuzz tests. :type num_trades: int :param long_maturity_vals_epsilon: The allowed error for maturity values equality tests for longs. :type long_maturity_vals_epsilon: float :param short_maturity_vals_epsilon: The allowed error for maturity values equality tests for shorts. :type short_maturity_vals_epsilon: float :param chain_config: Configuration options for the local chain. :type chain_config: LocalChain.Config, optional :param steth: Whether to use steth instead of erc4626 :type steth: bool :param pause_on_fail: If True, pause on test failure. :type pause_on_fail: bool .. !! processed by numpydoc !! .. py:function:: fuzz_path_independence(num_trades: int, num_paths_checked: int, lp_share_price_epsilon: float, effective_share_reserves_epsilon: float, present_value_epsilon: float, chain_config: agent0.core.hyperdrive.interactive.LocalChain.Config, steth: bool = False, pause_on_fail: bool = False) Does fuzzy invariant checks for opening and closing longs and shorts. :param num_trades: Number of trades to perform during the fuzz tests. :type num_trades: int :param num_paths_checked: Number of paths (order of operations for opening/closing) to perform. :type num_paths_checked: int :param lp_share_price_epsilon: The allowed error for LP share price equality tests. :type lp_share_price_epsilon: float :param effective_share_reserves_epsilon: The allowed error for effective share reserves equality tests. :type effective_share_reserves_epsilon: float :param present_value_epsilon: The allowed error for present value equality tests. :type present_value_epsilon: float :param chain_config: Configuration options for the local chain. :type chain_config: LocalChain.Config, optional :param steth: Whether to use steth instead of erc4626 :type steth: bool :param pause_on_fail: Whether to pause on failure. :type pause_on_fail: bool .. !! processed by numpydoc !! .. py:function:: fuzz_present_value(test_epsilon: float, chain_config: agent0.core.hyperdrive.interactive.LocalChain.Config, steth: bool = False, pause_on_fail: bool = False) Does fuzzy invariant checks for opening and closing longs and shorts. :param test_epsilon: The allowed error for present value equality tests. :type test_epsilon: float :param chain_config: Configuration options for the local chain. :type chain_config: LocalChain.Config, optional :param steth: Whether to use steth instead of erc4626 :type steth: bool :param pause_on_fail: Whether to pause on failure. :type pause_on_fail: bool .. !! processed by numpydoc !! .. py:function:: fuzz_profit_check(chain_config: agent0.core.hyperdrive.interactive.LocalChain.Config, steth: bool = False, pause_on_fail: bool = False) Fuzzes invariant checks for profit from long and short positions. :param chain_config: Configuration options for the local chain. :type chain_config: LocalChain.Config, optional :param steth: Whether to use steth instead of erc4626 :type steth: bool :param pause_on_fail: If True, pause on test failure. :type pause_on_fail: bool .. !! processed by numpydoc !!