Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update whales #1729

Merged
merged 6 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions scripts/fork_fuzz_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@
"0xdC035D45d973E3EC169d2276DDab16f1e407384F": "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD",
# sUSDe
"0x9D39A5DE30e57443BfF2A8307A4256c8797A3497": "0xb99a2c4C1C4F1fc27150681B740396F6CE1cBcF5",
# WXDAI
"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
# GYD
"0xe07F9D810a48ab5c3c914BA3cA53AF14E4491e8A": "0x209383219959CEF6763015AF0B394164AC526564",
}

GNOSIS_WHALE_ADDRESSES = {
# wstETH
"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": "0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f",
# WXDAI
"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": "0xd0Dd6cEF72143E22cCED4867eb0d5F2328715533",
# GYD
"0xCA5d8F8a8d49439357d3CF46Ca2e720702F132b8": "0x9eB168Ab44B7c479431681558FdF34230c969DE9",
}

LINEA_WHALE_ADDRESSES = {
Expand All @@ -75,7 +79,7 @@
# snARS
"0xC1F4C75e8925A67BE4F35D6b1c044B5ea8849a58": "0x54423d0A5c4e3a6Eb8Bd12FDD54c1e6b42D52Ebe",
# LP Token for Areo USD pool
"0x6cDcb1C4A4D1C3C6d054b27AC5B77e89eAFb971d": "0xD22B2890A6812414B544598fC77AC04382008754",
"0x6cDcb1C4A4D1C3C6d054b27AC5B77e89eAFb971d": "0xF831A8c0788a44483Df72f0D129F03Cb0e01bBe2",
}

# We build an outer lookup based on chain id
Expand Down Expand Up @@ -285,6 +289,8 @@ def main(argv: Sequence[str] | None = None) -> None:
num_iterations=parsed_args.num_iterations_per_episode,
accrue_interest_func=accrue_interest_fork,
accrue_interest_rate=FixedPoint(0.05),
# Never refund agents
minimum_avg_agent_base=FixedPoint(1_000_000_000_000),
)
except Exception as e: # pylint: disable=broad-except
log_rollbar_exception(
Expand Down
8 changes: 7 additions & 1 deletion src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,14 @@ def _check_trades_made_on_pool(
error_message = ""
if pool.name not in trade_counts["hyperdrive_name"].values:
has_err = True
log_level = logging.ERROR
error_message = f"Pool {pool.name} did not make any trades after {iteration} iterations"
else:
# There may be cases where certain trades may not be possible
# (e.g., once we open a large trade, we can't add LP since we're not advancing
# time enough). Due to this, we only track these issues via warnings,
# where an actual pool without any trades is an error.
log_level = logging.WARNING
pool_trade_event_counts = trade_counts[trade_counts["hyperdrive_name"] == pool.name][
"event_type"
].values
Expand Down Expand Up @@ -210,7 +216,7 @@ def _check_trades_made_on_pool(
error_message = "FuzzBots: " + error_message
logging.error(error_message)
# We log message to get rollbar to group these messages together
log_rollbar_message(error_message, logging.ERROR)
log_rollbar_message(error_message, log_level)


def run_fuzz_bots(
Expand Down
Loading