diff --git a/brownie/addresses.py b/brownie/addresses.py index e1949c6a27..57394460d7 100644 --- a/brownie/addresses.py +++ b/brownie/addresses.py @@ -77,6 +77,7 @@ OETHB = '0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3' OETHB_VAULT_VALUE_CHECKER = '0x9D98Cf85B65Fa1ACef5e9AAA2300753aDF7bcf6A' OETHB_AERODROME_AMO_STRATEGY = '0xF611cC500eEE7E4e4763A05FE623E2363c86d2Af' +OETHB_HYDREX_AMO_STRATEGY = '0x926846b8fa246B30652B103C369fce5db8B2F593' OETHB_WOETH_STRATEGY = '0x80c864704DD06C3693ed5179190786EE38ACf835' OETHB_CURVE_AMO_STRATEGY = '0x9cfcAF81600155e01c63e4D2993A8A81A8205829' OETHB_STRATEGIST = '0x4FF1b9D9ba8558F5EAfCec096318eA0d8b541971' diff --git a/brownie/runlogs/2026_07_strategist.py b/brownie/runlogs/2026_07_strategist.py new file mode 100644 index 0000000000..52c2d5979b --- /dev/null +++ b/brownie/runlogs/2026_07_strategist.py @@ -0,0 +1,108 @@ +# ------------------------------------------------------------- +# Jul 10, 2026 - Withdraw all liquidity from Hydrex AMO into the Super OETH Vault +# ------------------------------------------------------------- + +from world_base import * + + +def main(): + with TemporaryForkForOETHbReallocations() as txs: + # Before + txs.append(vault_core.rebase(from_strategist)) + txs.append(vault_value_checker.takeSnapshot(from_strategist)) + + vault_weth_before = weth.balanceOf(OETHB_VAULT_PROXY_ADDRESS) + hydrex_weth_before = hydrex_amo_strat.checkBalance(WETH_BASE) + + print("-----") + print("Hydrex WETH before", c18(hydrex_weth_before), hydrex_weth_before) + print("Vault WETH before ", c18(vault_weth_before), vault_weth_before) + print("-----") + + # Withdraw all WETH liquidity from the Hydrex AMO strategy into the vault. + txs.append( + vault_admin.withdrawAllFromStrategy( + OETHB_HYDREX_AMO_STRATEGY, + from_strategist + ) + ) + + vault_weth_after = weth.balanceOf(OETHB_VAULT_PROXY_ADDRESS) + hydrex_weth_after = hydrex_amo_strat.checkBalance(WETH_BASE) + withdrawn_weth = vault_weth_after - vault_weth_before + + assert hydrex_weth_after == 0, "Hydrex AMO still has WETH balance" + assert withdrawn_weth > 0, "No WETH was withdrawn into the vault" + + # After + vault_change = vault_core.totalValue() - vault_value_checker.snapshots(OETHB_MULTICHAIN_STRATEGIST)[0] + supply_change = oethb.totalSupply() - vault_value_checker.snapshots(OETHB_MULTICHAIN_STRATEGIST)[1] + profit = vault_change - supply_change + txs.append(vault_value_checker.checkDelta(profit, (1 * 10**18), vault_change, (10 * 10**18), from_strategist)) + + print("-----") + print("Hydrex WETH after ", c18(hydrex_weth_after), hydrex_weth_after) + print("Vault WETH after ", c18(vault_weth_after), vault_weth_after) + print("Withdrawn WETH ", c18(withdrawn_weth), withdrawn_weth) + print("Profit ", c18(profit), profit) + print("OETHb supply change", c18(supply_change), supply_change) + print("Vault Change ", c18(vault_change), vault_change) + print("-----") + + +# ------------------------------------------------------------- +# Jul 10, 2026 - Withdraw 15 WETH from Base Curve AMO into the Super OETH Vault +# ------------------------------------------------------------- + +from world_base import * + + +def main(): + with TemporaryForkForOETHbReallocations() as txs: + amount = 15 * 10**18 + + # Before + txs.append(vault_core.rebase(from_strategist)) + txs.append(vault_value_checker.takeSnapshot(from_strategist)) + + vault_weth_before = weth.balanceOf(OETHB_VAULT_PROXY_ADDRESS) + curve_amo_weth_before = base_curve_amo_strat.checkBalance(WETH_BASE) + + print("-----") + print("Curve AMO WETH before", c18(curve_amo_weth_before), curve_amo_weth_before) + print("Vault WETH before ", c18(vault_weth_before), vault_weth_before) + print("Withdraw amount ", c18(amount), amount) + print("-----") + + assert curve_amo_weth_before >= amount, "Curve AMO has less than 15 WETH" + + # Withdraw 15 WETH from the Base Curve AMO strategy into the vault. + txs.append( + vault_admin.withdrawFromStrategy( + OETHB_CURVE_AMO_STRATEGY, + [WETH_BASE], + [amount], + from_strategist + ) + ) + + vault_weth_after = weth.balanceOf(OETHB_VAULT_PROXY_ADDRESS) + curve_amo_weth_after = base_curve_amo_strat.checkBalance(WETH_BASE) + withdrawn_weth = vault_weth_after - vault_weth_before + + assert withdrawn_weth >= amount, "15 WETH was not withdrawn into the vault" + + # After + vault_change = vault_core.totalValue() - vault_value_checker.snapshots(OETHB_MULTICHAIN_STRATEGIST)[0] + supply_change = oethb.totalSupply() - vault_value_checker.snapshots(OETHB_MULTICHAIN_STRATEGIST)[1] + profit = vault_change - supply_change + txs.append(vault_value_checker.checkDelta(profit, (1 * 10**18), vault_change, (10 * 10**18), from_strategist)) + + print("-----") + print("Curve AMO WETH after ", c18(curve_amo_weth_after), curve_amo_weth_after) + print("Vault WETH after ", c18(vault_weth_after), vault_weth_after) + print("Withdrawn WETH ", c18(withdrawn_weth), withdrawn_weth) + print("Profit ", c18(profit), profit) + print("OETHb supply change ", c18(supply_change), supply_change) + print("Vault Change ", c18(vault_change), vault_change) + print("-----") diff --git a/brownie/world_base.py b/brownie/world_base.py index 505b5c0262..bec1418e0a 100644 --- a/brownie/world_base.py +++ b/brownie/world_base.py @@ -31,6 +31,7 @@ oethb_weth_bribe = load_contract('aero_bribes', OETHB_WETH_BRIBE_CONTRACT) amo_strat = load_contract('aerodrome_amo_strategy', OETHB_AERODROME_AMO_STRATEGY) +hydrex_amo_strat = load_contract('aerodrome_amo_strategy', OETHB_HYDREX_AMO_STRATEGY) vault_admin = load_contract('vault_admin', OETHB_VAULT_PROXY_ADDRESS) vault_core = load_contract('vault_core', OETHB_VAULT_PROXY_ADDRESS) vault_value_checker = load_contract('vault_value_checker', OETHB_VAULT_VALUE_CHECKER) @@ -122,4 +123,4 @@ def amo_snapshot(): # print(" ", leading_whitespace("Amount"), leading_whitespace("Percentage")) # print("WETH ", c18(wethPoolBalance), pcts(wethPoolBalance * 100 / total)) # print("superOETH ", c18(superOETHbPoolBalance), pcts(superOETHbPoolBalance * 100 / total)) - # print("Total ", c18(poolTotal), pcts(100)) \ No newline at end of file + # print("Total ", c18(poolTotal), pcts(100))