Skip to content

Commit

Permalink
Run log to set Meta Morpho strategy as default for USDC (#2284)
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 authored Oct 22, 2024
1 parent 7a65810 commit 50f7fb3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions brownie/runlogs/2024_10_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,27 @@ def main():
print("-----")
print("Profit", "{:.6f}".format(profit / 10**18), profit)
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)

# -----------------------------------------------------
# Oct 22, 2024 - Change the USDC default strategy from Morpho Aave V2 to the new Meta Morpho strategy
# -----------------------------------------------------

from world import *

def main():
with TemporaryForkForReallocations() as txs:
# Before
txs.append(vault_core.rebase({'from':STRATEGIST}))
txs.append(vault_value_checker.takeSnapshot({'from':STRATEGIST}))

txs.append(vault_admin.setAssetDefaultStrategy(USDC, MORPHO_META_USDC_STRAT, {'from':STRATEGIST}))

# After
vault_change = vault_core.totalValue() - vault_value_checker.snapshots(STRATEGIST)[0]
supply_change = ousd.totalSupply() - vault_value_checker.snapshots(STRATEGIST)[1]
profit = vault_change - supply_change

txs.append(vault_value_checker.checkDelta(profit, (500 * 10**18), vault_change, (500 * 10**18), {'from': STRATEGIST}))
print("-----")
print("Profit", "{:.6f}".format(profit / 10**18), profit)
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)

0 comments on commit 50f7fb3

Please sign in to comment.