@@ -335,4 +335,45 @@ def main():
335335from buyback import *
336336
337337def main ():
338- build_buyback_tx (max_dollars = 2750 , max_slippage = 2 )
338+ build_buyback_tx (max_dollars = 2750 , max_slippage = 2 )
339+
340+ # -----------------------------------
341+ # July 21, 2023 - OGV Buyback #2
342+ # -----------------------------------
343+ from buyback import *
344+
345+ def main ():
346+ build_buyback_tx (max_dollars = 3100 , max_slippage = 2 )
347+
348+ # --------------------------------
349+ # July 24, 2023 - OETH AMO Deposit
350+ # --------------------------------
351+
352+ from world import *
353+
354+ txs = []
355+ with TemporaryFork ():
356+ # Before
357+ txs .append (vault_oeth_core .rebase ({'from' :STRATEGIST }))
358+ txs .append (oeth_vault_value_checker .takeSnapshot ({'from' :STRATEGIST }))
359+
360+ # Strategist
361+ txs .append (vault_oeth_admin .depositToStrategy (OETH_CONVEX_OETH_ETH_STRAT , [weth ], [80 * 1e18 ], {'from' : STRATEGIST }))
362+
363+ #After
364+ vault_change = vault_oeth_core .totalValue () - oeth_vault_value_checker .snapshots (STRATEGIST )[0 ]
365+ supply_change = oeth .totalSupply () - oeth_vault_value_checker .snapshots (STRATEGIST )[1 ]
366+ profit = vault_change - supply_change
367+ txs .append (oeth_vault_value_checker .checkDelta (profit , (1 * 10 ** 18 ), vault_change , (1 * 10 ** 18 ), {'from' : STRATEGIST }))
368+ print ("-----" )
369+ print ("Profit" , "{:.6f}" .format (profit / 10 ** 18 ), profit )
370+ print ("Vault Change" , "{:.6f}" .format (vault_change / 10 ** 18 ), vault_change )
371+ print ("Variance" , 10 ** 17 )
372+ print ("-----" )
373+ print ("Est Gas Max: {:,}" .format (1.10 * sum ([x .gas_used for x in txs ])))
374+
375+ print ("Schedule the following transactions on Gnosis Safe" )
376+ for idx , item in enumerate (txs ):
377+ print ("Transaction " , idx )
378+ print ("To: " , item .receiver )
379+ print ("Data (Hex encoded): " , item .input , "\n " )
0 commit comments