Skip to content

Commit

Permalink
Run log: Withdraw 16 WETH from 2nd staking strategy (#2260)
Browse files Browse the repository at this point in the history
* Run log OUSD reallocate 10k USDC to new MetaMorpho strat

* Run log - withdraw 16 WETH from 2nd staking strategy
  • Loading branch information
naddison36 authored Sep 27, 2024
1 parent adf9e7b commit b63010c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions brownie/runlogs/2024_09_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit b63010c

Please sign in to comment.