diff --git a/brownie/runlogs/2023_10_strategist.py b/brownie/runlogs/2023_10_strategist.py index 3cddbc1518..bccb0e3d4d 100644 --- a/brownie/runlogs/2023_10_strategist.py +++ b/brownie/runlogs/2023_10_strategist.py @@ -159,3 +159,63 @@ def main(): print("Profit", "{:.6f}".format(profit / 10**18), profit) print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change) print("-----") + +# ------------------------------------- +# Oct 03, 2023 - OETH Balancer rETH allocation +# ------------------------------------- +from world import * + +with TemporaryForkForReallocations() as txs: + # Before + txs.append(vault_oeth_core.rebase({'from': STRATEGIST})) + txs.append(oeth_vault_value_checker.takeSnapshot({'from': STRATEGIST})) + + # Deposit 32 rETH to BalancerRethStrategy + txs.append( + vault_oeth_admin.depositToStrategy( + BALANCER_RETH_STRATEGY, + [reth], + [32 * 10**18], + {'from': STRATEGIST} + ) + ) + + # After + vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0] + supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1] + profit = vault_change - supply_change + txs.append(oeth_vault_value_checker.checkDelta(profit, (0.1 * 10**18), vault_change, (0.1 * 10**18), {'from': STRATEGIST})) + print("-----") + print("Profit", "{:.6f}".format(profit / 10**18), profit) + print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change) + print("-----") + +# ------------------------------------- +# Oct 05, 2023 - OETH Balancer rETH allocation +# ------------------------------------- +from world import * + +with TemporaryForkForReallocations() as txs: + # Before + txs.append(vault_oeth_core.rebase({'from': STRATEGIST})) + txs.append(oeth_vault_value_checker.takeSnapshot({'from': STRATEGIST})) + + # Deposit 32 rETH to BalancerRethStrategy + txs.append( + vault_oeth_admin.depositToStrategy( + BALANCER_RETH_STRATEGY, + [reth, weth], + [32 * 10**18, 36.57 * 10**18], + {'from': STRATEGIST} + ) + ) + + # After + vault_change = vault_oeth_core.totalValue() - oeth_vault_value_checker.snapshots(STRATEGIST)[0] + supply_change = oeth.totalSupply() - oeth_vault_value_checker.snapshots(STRATEGIST)[1] + profit = vault_change - supply_change + txs.append(oeth_vault_value_checker.checkDelta(profit, (0.1 * 10**18), vault_change, (0.1 * 10**18), {'from': STRATEGIST})) + print("-----") + print("Profit", "{:.6f}".format(profit / 10**18), profit) + print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change) + print("-----")