@@ -142,3 +142,63 @@ def main():
142
142
print ("Pool OETH " , "{:.6f}" .format (oethPoolBalance / 10 ** 18 ), oethPoolBalance * 100 / totalPool )
143
143
print ("Pool Total " , "{:.6f}" .format (totalPool / 10 ** 18 ), totalPool )
144
144
print ("Sell 10 OETH Curve prices before and after" , "{:.6f}" .format (eth_out_before / 10 ** 18 ), "{:.6f}" .format (eth_out_after / 10 ** 18 ))
145
+
146
+
147
+ # -------------------------------------
148
+ # May 12, 2024 - Deposit 10 WETH to new OETH Curve AMO
149
+ # -------------------------------------
150
+ from world import *
151
+
152
+ def main ():
153
+ with TemporaryForkForReallocations () as txs :
154
+ # Before
155
+ txs .append (vault_oeth_core .rebase (std ))
156
+ txs .append (oeth_vault_value_checker .takeSnapshot (std ))
157
+
158
+ # AMO pool before
159
+ wethPoolBalance = weth .balanceOf (OETH_CURVE_POOL )
160
+ oethPoolBalance = oeth .balanceOf (OETH_CURVE_POOL )
161
+ totalPool = wethPoolBalance + oethPoolBalance
162
+ weth_out_before = oeth_curve_pool .get_dy (1 , 0 , 10 ** 18 )
163
+
164
+ print ("Curve OETH/WETH Pool before" )
165
+ print ("Pool WETH " , "{:.6f}" .format (wethPoolBalance / 10 ** 18 ), wethPoolBalance * 100 / totalPool )
166
+ print ("Pool OETH " , "{:.6f}" .format (oethPoolBalance / 10 ** 18 ), oethPoolBalance * 100 / totalPool )
167
+ print ("Pool Total " , "{:.6f}" .format (totalPool / 10 ** 18 ), totalPool )
168
+
169
+
170
+ # Deposit WETH to Curve AMO
171
+ txs .append (
172
+ vault_oeth_admin .depositToStrategy (
173
+ OETH_CURVE_AMO_STRAT ,
174
+ [WETH ],
175
+ [10 * 10 ** 18 ],
176
+ {'from' : STRATEGIST }
177
+ )
178
+ )
179
+
180
+ # After
181
+ vault_change = vault_oeth_core .totalValue () - oeth_vault_value_checker .snapshots (STRATEGIST )[0 ]
182
+ supply_change = oeth .totalSupply () - oeth_vault_value_checker .snapshots (STRATEGIST )[1 ]
183
+ profit = vault_change - supply_change
184
+
185
+ txs .append (oeth_vault_value_checker .checkDelta (profit , (1 * 10 ** 18 ), vault_change , (1 * 10 ** 18 ), std ))
186
+
187
+ print ("-----" )
188
+ print ("Profit" , "{:.6f}" .format (profit / 10 ** 18 ), profit )
189
+ print ("OETH supply change" , "{:.6f}" .format (supply_change / 10 ** 18 ), supply_change )
190
+ print ("Vault Change" , "{:.6f}" .format (vault_change / 10 ** 18 ), vault_change )
191
+ print ("-----" )
192
+
193
+
194
+ # AMO pool after
195
+ wethPoolBalance = weth .balanceOf (OETH_CURVE_POOL )
196
+ oethPoolBalance = oeth .balanceOf (OETH_CURVE_POOL )
197
+ totalPool = wethPoolBalance + oethPoolBalance
198
+ weth_out_after = oeth_curve_pool .get_dy (1 , 0 , 10 ** 18 )
199
+
200
+ print ("Curve OETH/ETH Pool after" )
201
+ print ("Pool WETH " , "{:.6f}" .format (wethPoolBalance / 10 ** 18 ), wethPoolBalance * 100 / totalPool )
202
+ print ("Pool OETH " , "{:.6f}" .format (oethPoolBalance / 10 ** 18 ), oethPoolBalance * 100 / totalPool )
203
+ print ("Pool Total " , "{:.6f}" .format (totalPool / 10 ** 18 ), totalPool )
204
+ print ("Sell 10 OETH Curve prices before and after" , "{:.6f}" .format (weth_out_before / 10 ** 18 ), "{:.6f}" .format (weth_out_after / 10 ** 18 ))
0 commit comments