Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run log 17 Oct 2024 #2279

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions brownie/runlogs/2024_10_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,44 @@ def main():
{'from': OETH_ARM}
)
)

# -----------------------------------------------------
# Oct 17th 2024 - OUSD Reallocation 2.483m 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 2.483m from Morpho Aave
txs.append(
vault_admin.withdrawFromStrategy(
MORPHO_AAVE_STRAT,
[usdc],
[2_483_000 * 10**6],
{'from': STRATEGIST}
)
)

# Put everything in new MetaMorpho
txs.append(
vault_admin.depositToStrategy(
MORPHO_META_USDC_STRAT,
[usdc],
[2_483_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)
Loading