Skip to content

Commit

Permalink
Add runlog (#2226)
Browse files Browse the repository at this point in the history
* Add runlog

* Update runlog
  • Loading branch information
shahthepro authored Sep 11, 2024
1 parent e887557 commit f0d0ace
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion brownie/runlogs/2024_09_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,46 @@ def main():
)
)

print(to_gnosis_json(txs))
print(to_gnosis_json(txs))

# -------------------------------------------
# Sept 11 2024 - OETHb allocation & rebalance
# -------------------------------------------
from world_base import *

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

# Deposit all WETH
txs.append(
vault_admin.depositToStrategy(
OETHB_AERODROME_AMO_STRATEGY,
[weth],
[weth.balanceOf(OETHB_VAULT_PROXY_ADDRESS)],
{'from': OETHB_STRATEGIST}
)
)

# deposit funds into the underlying strategy
txs.append(
amo_strat.rebalance(
0,
True,
0,
{'from': OETHB_STRATEGIST}
)
)

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

txs.append(vault_value_checker.checkDelta(profit, (1 * 10**18), vault_change, (1 * 10**18), {'from': OETHB_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 f0d0ace

Please sign in to comment.