Skip to content

Commit 15277fc

Browse files
authored
Add July 17 runlog (#1702)
* Add July 17 runlog * Update script
1 parent 4ea0fe6 commit 15277fc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

brownie/runlogs/2023_07_strategist.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def main():
148148
print("Transaction ", idx)
149149
print("To: ", item.receiver)
150150
print("Data (Hex encoded): ", item.input, "\n")
151+
151152
# -------------------------------
152153
# July 13, 2023 - OUSD Allocation
153154
# -------------------------------
@@ -256,6 +257,38 @@ def main():
256257
print("To: ", item.receiver)
257258
print("Data (Hex encoded): ", item.input, "\n")
258259

260+
# --------------------------------
261+
# July 17, 2023 - OETH AMO Deposit
262+
# --------------------------------
263+
264+
from world import *
265+
266+
txs = []
267+
with TemporaryFork():
268+
# Before
269+
txs.append(vault_oeth_core.rebase({'from':STRATEGIST}))
270+
txs.append(oeth_vault_value_checker.takeSnapshot({'from':STRATEGIST}))
271+
272+
# Strategist
273+
txs.append(vault_oeth_admin.depositToStrategy(OETH_CONVEX_OETH_ETH_STRAT, [weth], [350*1e18], {'from': STRATEGIST}))
274+
275+
#After
276+
vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0]
277+
supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1]
278+
profit = vault_change - supply_change
279+
txs.append(oeth_vault_value_checker.checkDelta(profit, (1 * 10**18), vault_change, (1 * 10**18), {'from': STRATEGIST}))
280+
print("-----")
281+
print("Profit", "{:.6f}".format(profit / 10**18), profit)
282+
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
283+
print("-----")
284+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
285+
286+
print("Schedule the following transactions on Gnosis Safe")
287+
for idx, item in enumerate(txs):
288+
print("Transaction ", idx)
289+
print("To: ", item.receiver)
290+
print("Data (Hex encoded): ", item.input, "\n")
291+
259292

260293
# -----------------------------------
261294
# July 20, 2023 - Collateral Swap of 2,500 rETH for WETH

0 commit comments

Comments
 (0)