Skip to content

Commit

Permalink
Run log OUSD reallocate 200k USDC to new MetaMorpho strat
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-ux committed Oct 3, 2024
1 parent 3d57a07 commit b0f1ecb
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion brownie/runlogs/2024_10_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,45 @@ def main():
amo_snapsnot()
print("--------------------")
print("Profit ", c18(profit), profit)
print("Vault Change ", c18(vault_change), vault_change)
print("Vault Change ", c18(vault_change), vault_change)

# -----------------------------------------------------
# Oct 3rd 2024 - OUSD Reallocation 200k USDC from Morpho Aave to new MetaMorpho
# -----------------------------------------------------
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}))

# Withdraw 10k from Morpho Aave
txs.append(
vault_admin.withdrawFromStrategy(
MORPHO_AAVE_STRAT,
[usdc],
[200_000 * 10**6],
{'from': STRATEGIST}
)
)

# Put everything in new MetaMorpho
txs.append(
vault_admin.depositToStrategy(
MORPHO_META_USDC_STRAT,
[usdc],
[200_000*10**6],
{'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 b0f1ecb

Please sign in to comment.