Skip to content

Commit 8313e17

Browse files
authored
Full move back into OETH (#1732)
1 parent 3390826 commit 8313e17

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

brownie/runlogs/2023_08_strategist.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# -------------------------------------
2+
# Aug 1, 2023 - OETH back into earning
3+
# ------------------------------------
4+
15
from world import *
26

37

@@ -20,6 +24,58 @@
2024
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
2125
print("-----")
2226

27+
28+
# -------------------------------------
29+
# Aug 2, 2023 - OETH back into earning
30+
# ------------------------------------
31+
32+
from world import *
33+
34+
with TemporaryForkForReallocations() as txs:
35+
# Before
36+
txs.append(vault_oeth_core.rebase({'from':STRATEGIST}))
37+
txs.append(oeth_vault_value_checker.takeSnapshot({'from':STRATEGIST}))
38+
39+
# Strategist
40+
txs.append(vault_oeth_admin.depositToStrategy(OETH_CONVEX_OETH_ETH_STRAT, [weth], [1_952*1e18], {'from': STRATEGIST}))
41+
42+
#After
43+
vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0]
44+
supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1]
45+
profit = vault_change - supply_change
46+
txs.append(oeth_vault_value_checker.checkDelta(profit, (0.1 * 10**18), vault_change, (1000 * 10**18), {'from': STRATEGIST}))
47+
print("-----")
48+
print("Profit", "{:.6f}".format(profit / 10**18), profit)
49+
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
50+
print("-----")
51+
52+
53+
# -------------------------------------
54+
# Aug 2, 2023 - Remaining OETH back into earning
55+
# ------------------------------------
56+
57+
from world import *
58+
59+
with TemporaryForkForReallocations() as txs:
60+
# Before
61+
txs.append(vault_oeth_core.rebase({'from':STRATEGIST}))
62+
txs.append(oeth_vault_value_checker.takeSnapshot({'from':STRATEGIST}))
63+
64+
# Strategist
65+
vault_weth = weth.balanceOf(vault_oeth_admin)
66+
txs.append(vault_oeth_admin.depositToStrategy(OETH_CONVEX_OETH_ETH_STRAT, [weth], [vault_weth-int(100*1e18)], {'from': STRATEGIST}))
67+
68+
#After
69+
vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0]
70+
supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1]
71+
profit = vault_change - supply_change
72+
txs.append(oeth_vault_value_checker.checkDelta(profit, (0.1 * 10**18), vault_change, (1000 * 10**18), {'from': STRATEGIST}))
73+
print("-----")
74+
print("Profit", "{:.6f}".format(profit / 10**18), profit)
75+
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
76+
print("-----")
77+
78+
2379
# -----------------------------------
2480
# August 03, 2023 - OGV Buyback
2581
# -----------------------------------
@@ -28,6 +84,7 @@
2884
def main():
2985
build_buyback_tx(max_dollars=2250, max_slippage=1.5, with_fork=True)
3086

87+
3188
# -----------------------------------
3289
# August 03, 2023 - CVX Buyback
3390
# -----------------------------------
@@ -85,3 +142,4 @@ def main():
85142
txs = []
86143
def main():
87144
build_buyback_tx(max_slippage=1.5, with_fork=True)
145+

0 commit comments

Comments
 (0)