Skip to content

Commit

Permalink
chore: update scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
cdummett committed Aug 20, 2024
1 parent 05406b7 commit ebce0d6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion vega_sim/scenario/fuzzed_markets/fuzzers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _pick_rank_table():
)
)
if valid(rs, bias):
if distribution_strategy != vega_protos.vega.DISTRIBUTION_STRATEGY_RANK:
if distribution_strategy == vega_protos.vega.DISTRIBUTION_STRATEGY_PRO_RATA:
return None
return val
return None if rs.rand() < 0.5 else val
Expand Down
42 changes: 21 additions & 21 deletions vega_sim/scenario/fuzzing/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,27 +140,27 @@ def configure_agents(
for i_referrer, i_agent in itertools.product(range(2), range(2))
]
)
# extra_agents.extend(
# [
# ReferralAgentWrapper(
# agent=FuzzedAutomatedMarketMaker(
# wallet_name="FuzzedAutomatedMarketMaker",
# key_name=(
# f"FuzzedAutomatedMarketMaker{str(i_referrer).zfill(3)}_{str(i_agent).zfill(3)}"
# ),
# market_name=market_name,
# submit_probability=0.5,
# amend_probability=0.5,
# cancel_probability=0.1,
# initial_asset_mint=1e6,
# tag=f"{market_code}_{str(i_referrer).zfill(3)}_{str(i_agent).zfill(3)}",
# ),
# referrer_wallet_name="ReferralAgentWrapper",
# referrer_key_name=f"ReferralAgentWrapper_{str(i_referrer).zfill(3)}",
# )
# for i_referrer, i_agent in itertools.product(range(2), range(2))
# ]
# )
extra_agents.extend(
[
ReferralAgentWrapper(
agent=FuzzedAutomatedMarketMaker(
wallet_name="FuzzedAutomatedMarketMaker",
key_name=(
f"FuzzedAutomatedMarketMaker{str(i_referrer).zfill(3)}_{str(i_agent).zfill(3)}"
),
market_name=market_name,
submit_probability=0.5,
amend_probability=0.5,
cancel_probability=0.1,
initial_asset_mint=1e6,
tag=f"{market_code}_{str(i_referrer).zfill(3)}_{str(i_agent).zfill(3)}",
),
referrer_wallet_name="ReferralAgentWrapper",
referrer_key_name=f"ReferralAgentWrapper_{str(i_referrer).zfill(3)}",
)
for i_referrer, i_agent in itertools.product(range(2), range(2))
]
)
extra_agents.append(
TransactionDelayChecker(
wallet_name="TransactionDelayChecker",
Expand Down

0 comments on commit ebce0d6

Please sign in to comment.