From b63010c4be22360bb01ed6e5b16e7d19084db255 Mon Sep 17 00:00:00 2001 From: Nick Addison Date: Fri, 27 Sep 2024 19:42:55 +1000 Subject: [PATCH] Run log: Withdraw 16 WETH from 2nd staking strategy (#2260) * Run log OUSD reallocate 10k USDC to new MetaMorpho strat * Run log - withdraw 16 WETH from 2nd staking strategy --- brownie/runlogs/2024_09_strategist.py | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/brownie/runlogs/2024_09_strategist.py b/brownie/runlogs/2024_09_strategist.py index 50e5b87332..c9eaf1f4e4 100644 --- a/brownie/runlogs/2024_09_strategist.py +++ b/brownie/runlogs/2024_09_strategist.py @@ -1292,3 +1292,35 @@ def main(): print("-----") print("Profit", "{:.6f}".format(profit / 10**18), profit) print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change) + +# ------------------------------- +# Sep 27, 2024 - Withdraw from 2nd Native Staking Strategy +# ------------------------------- +from world import * + +def main(): + with TemporaryForkForReallocations() as txs: + # Before + txs.append(oeth_dripper.collectAndRebase(std)) + txs.append(oeth_vault_value_checker.takeSnapshot(std)) + + # Withdraw 16 WETH from the Second Native Staking Strategy + txs.append( + vault_oeth_admin.withdrawFromStrategy( + OETH_NATIVE_STAKING_2_STRAT, + [WETH], + [16 * 10**18], + std + ) + ) + + # After + vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0] + supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1] + profit = vault_change - supply_change + + txs.append(oeth_vault_value_checker.checkDelta(profit, (1 * 10**17), vault_change, (1 * 10**17), std)) + print("-----") + print("Profit", "{:.6f}".format(profit / 10**18), profit) + print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change) +