Skip to content

Commit 83d9365

Browse files
authored
Run log for 260 WETH AMO Deposit (#1715)
1 parent 16a45a6 commit 83d9365

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
@@ -410,3 +410,36 @@ def main():
410410
print("Transaction ", idx)
411411
print("To: ", item.receiver)
412412
print("Data (Hex encoded): ", item.input, "\n")
413+
414+
# --------------------------------
415+
# July 25, 2023 - OETH AMO Deposit
416+
# --------------------------------
417+
418+
from world import *
419+
420+
txs = []
421+
with TemporaryFork():
422+
# Before
423+
txs.append(vault_oeth_core.rebase({'from':STRATEGIST}))
424+
txs.append(oeth_vault_value_checker.takeSnapshot({'from':STRATEGIST}))
425+
426+
# Strategist
427+
txs.append(vault_oeth_admin.depositToStrategy(OETH_CONVEX_OETH_ETH_STRAT, [weth], [260 * 1e18], {'from': STRATEGIST}))
428+
429+
#After
430+
vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0]
431+
supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1]
432+
profit = vault_change - supply_change
433+
txs.append(oeth_vault_value_checker.checkDelta(profit, (1 * 10**18), vault_change, (1 * 10**18), {'from': STRATEGIST}))
434+
print("-----")
435+
print("Profit", "{:.6f}".format(profit / 10**18), profit)
436+
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
437+
print("Variance", 10**17)
438+
print("-----")
439+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
440+
441+
print("Schedule the following transactions on Gnosis Safe")
442+
for idx, item in enumerate(txs):
443+
print("Transaction ", idx)
444+
print("To: ", item.receiver)
445+
print("Data (Hex encoded): ", item.input, "\n")

0 commit comments

Comments
 (0)