From 795f6f643ffb7a3af35094f8ddd55be9a7cce718 Mon Sep 17 00:00:00 2001 From: Daniel Von Fange Date: Thu, 16 Mar 2023 08:42:43 -0400 Subject: [PATCH] USDC depeg runlogs --- brownie/runlogs/2023_03_strategist.py | 251 +++++++++++++++++++++++++- 1 file changed, 249 insertions(+), 2 deletions(-) diff --git a/brownie/runlogs/2023_03_strategist.py b/brownie/runlogs/2023_03_strategist.py index 3329a5a618..ef65496dc3 100644 --- a/brownie/runlogs/2023_03_strategist.py +++ b/brownie/runlogs/2023_03_strategist.py @@ -1,6 +1,6 @@ # -------------------------------- -# Feb 28, 2023 - Weekly allocation +# Mar 10, 2023 - Weekly allocation # from addresses import * @@ -56,4 +56,251 @@ # safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC') # safe_tx = safe.multisend_from_receipts(txs) # safe.sign_with_frame(safe_tx) -# r = safe.post_transaction(safe_tx) \ No newline at end of file +# r = safe.post_transaction(safe_tx) + + + +# -------------------------------- +# March 10, 2023 - USDC Depeg +# + +from addresses import * +from world import * +from allocations import * +from ape_safe import ApeSafe + +votes = """ +Morpho Aave USDT 39.04% +Convex OUSD+3Crv 32.18% +Morpho Aave DAI 9.23% +Morpho Aave USDC 9.23% +Convex DAI+USDC+USDT 4.96% +Aave USDT 1.02% +Compound USDC 1.02% +Morpho Compound DAI 1.02% +Morpho Compound USDC 1.02% +Morpho Compound USDT 1.02% +Convex LUSD+3Crv 0.3% +Existing Allocation 0% +Aave DAI 0% +Aave USDC 0% +Compound DAI 0% +Compound USDT 0% + """ + +with TemporaryForkWithVaultStats(votes): + before_votes = with_target_allocations(load_from_blockchain(), votes) + + txs = [] + txs.extend(auto_take_snapshot()) + + # From + txs.append(vault_admin.withdrawAllFromStrategy(LUSD_3POOL_STRAT, {'from': STRATEGIST})) + txs.append(vault_admin.withdrawAllFromStrategy(CONVEX_STRAT, {'from': STRATEGIST})) + + txs.extend(auto_check_snapshot()) + +print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs]))) + + +safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC') +safe_tx = safe.multisend_from_receipts(txs) +safe.sign_with_frame(safe_tx) +r = safe.post_transaction(safe_tx) + + + +# -------------------------------- +# March 10, 2023 - USDC Depeg +# + +from addresses import * +from world import * +from allocations import * +from ape_safe import ApeSafe + +votes = """ +Morpho Aave USDT 39.04% +Convex OUSD+3Crv 32.18% +Morpho Aave DAI 9.23% +Morpho Aave USDC 9.23% +Convex DAI+USDC+USDT 4.96% +Aave USDT 1.02% +Compound USDC 1.02% +Morpho Compound DAI 1.02% +Morpho Compound USDC 1.02% +Morpho Compound USDT 1.02% +Convex LUSD+3Crv 0.3% +Existing Allocation 0% +Aave DAI 0% +Aave USDC 0% +Compound DAI 0% +Compound USDT 0% + """ + +with TemporaryForkWithVaultStats(votes): + before_votes = with_target_allocations(load_from_blockchain(), votes) + + txs = [] + txs.extend(auto_take_snapshot()) + + # From + txs.append(vault_admin.withdrawAllFromStrategy(OUSD_METASTRAT, {'from': STRATEGIST})) + + txs.extend(auto_check_snapshot()) + +print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs]))) + + +safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC') +safe_tx = safe.multisend_from_receipts(txs) +safe.sign_with_frame(safe_tx) +r = safe.post_transaction(safe_tx) + + + +# -------------------------------- +# March 10, 2023 - USDC Depeg +# + +from addresses import * +from world import * +from allocations import * +from ape_safe import ApeSafe + +votes = """ +Morpho Aave USDT 39.04% +Convex OUSD+3Crv 32.18% +Morpho Aave DAI 9.23% +Morpho Aave USDC 9.23% +Convex DAI+USDC+USDT 4.96% +Aave USDT 1.02% +Compound USDC 1.02% +Morpho Compound DAI 1.02% +Morpho Compound USDC 1.02% +Morpho Compound USDT 1.02% +Convex LUSD+3Crv 0.3% +Existing Allocation 0% +Aave DAI 0% +Aave USDC 0% +Compound DAI 0% +Compound USDT 0% + """ + +with TemporaryForkWithVaultStats(votes): + before_votes = with_target_allocations(load_from_blockchain(), votes) + + txs = [] + txs.extend(auto_take_snapshot()) + + # From + # txs.append(vault_admin.withdrawAllFromStrategy(LUSD_3POOL_STRAT, {'from': STRATEGIST})) + txs.append(vault_admin.withdrawAllFromStrategy(CONVEX_STRAT, {'from': STRATEGIST})) + + txs.extend(auto_check_snapshot()) + +print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs]))) + + +safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC') +safe_tx = safe.multisend_from_receipts(txs) +safe.sign_with_frame(safe_tx) +r = safe.post_transaction(safe_tx) + + + +# -------------------------------- +# March 10, 2023 - More Depeg +# + +from addresses import * +from world import * +from allocations import * +from ape_safe import ApeSafe + +votes = """ +Morpho Aave USDT 39.04% +Convex OUSD+3Crv 32.18% +Morpho Aave DAI 9.23% +Morpho Aave USDC 9.23% +Convex DAI+USDC+USDT 4.96% +Aave USDT 1.02% +Compound USDC 1.02% +Morpho Compound DAI 1.02% +Morpho Compound USDC 1.02% +Morpho Compound USDT 1.02% +Convex LUSD+3Crv 0.3% +Existing Allocation 0% +Aave DAI 0% +Aave USDC 0% +Compound DAI 0% +Compound USDT 0% + """ + +with TemporaryForkWithVaultStats(votes): + before_votes = with_target_allocations(load_from_blockchain(), votes) + + txs = [] + # txs.extend(auto_take_snapshot()) + + # From + txs.append(from_strat(MORPHO_COMP_STRAT, [[483_083, dai], [526_766, usdc], [3_155_766, usdt]])) + txs.append(from_strat(MORPHO_AAVE_STRAT, [ [3_155_766, usdt]])) + + # txs.extend(auto_check_snapshot()) + +print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs]))) + + +safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC') +safe_tx = safe.multisend_from_receipts(txs) +safe.sign_with_frame(safe_tx) +r = safe.post_transaction(safe_tx) + + +# -------------------------------- +# March 11, 2023 - Depeg IN +# + +from addresses import * +from world import * +from allocations import * +from ape_safe import ApeSafe + +votes = """ +Morpho Aave USDT 39.04% +Convex OUSD+3Crv 32.18% +Morpho Aave DAI 9.23% +Morpho Aave USDC 9.23% +Convex DAI+USDC+USDT 4.96% +Aave USDT 1.02% +Compound USDC 1.02% +Morpho Compound DAI 1.02% +Morpho Compound USDC 1.02% +Morpho Compound USDT 1.02% +Convex LUSD+3Crv 0.3% +Existing Allocation 0% +Aave DAI 0% +Aave USDC 0% +Compound DAI 0% +Compound USDT 0% + """ + +with TemporaryForkWithVaultStats(votes): + before_votes = with_target_allocations(load_from_blockchain(), votes) + + txs = [] + txs.extend(auto_take_snapshot()) + + # From + txs.append(to_strat(OUSD_METASTRAT, [[1_000_000, usdc]])) + + txs.extend(auto_check_snapshot()) + +print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs]))) + + +safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC') +safe_tx = safe.multisend_from_receipts(txs) +safe.sign_with_frame(safe_tx) +r = safe.post_transaction(safe_tx) \ No newline at end of file