Skip to content

Commit 39730ea

Browse files
authored
Run log deposit 10 WETH to new OETH Curve AMO (#2511)
* Run log deposit 10 WETH to new OETH Curve AMO * Added Curve AMO strategy to OETH contract diagram
1 parent 27b2dd9 commit 39730ea

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed

brownie/addresses.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
OETH_MORPHO_AAVE_STRAT ='0xc1fc9E5eC3058921eA5025D703CBE31764756319'
5959
OETH_VAULT_VALUE_CHECKER = '0x31fd8618379d8e473ec2b1540b906e8e11d2a99b'
6060
OETH_CONVEX_OETH_ETH_STRAT = '0x1827F9eA98E0bf96550b2FC20F7233277FcD7E63'
61+
OETH_CURVE_AMO_STRAT = '0xba0e352AB5c13861C26e4E773e7a833C3A223FE6'
6162
OETH_FRAX_ETH_STRAT = '0x3ff8654d633d4ea0fae24c52aec73b4a20d0d0e5'
6263
OETH_FRAX_ETH_REDEEM_STRAT = '0x95A8e45afCfBfEDd4A1d41836ED1897f3Ef40A9e'
6364
OETH_NATIVE_STAKING_STRAT = '0x34edb2ee25751ee67f68a45813b22811687c0238'
@@ -164,6 +165,7 @@
164165
FRAX_ETH_STRATEGY = "0x3ff8654d633d4ea0fae24c52aec73b4a20d0d0e5"
165166
BALANCER_RETH_STRATEGY = "0x49109629aC1deB03F2e9b2fe2aC4a623E0e7dfDC"
166167
OETH_METAPOOL = '0x94b17476a93b3262d87b9a326965d1e91f9c13e7'
168+
OETH_CURVE_POOL = '0xcc7d5785AD5755B6164e21495E07aDb0Ff11C2A8'
167169

168170
WOETH = "0xDcEe70654261AF21C44c093C300eD3Bb97b78192"
169171

brownie/runlogs/2025_05_strategist.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,63 @@ def main():
142142
print("Pool OETH ", "{:.6f}".format(oethPoolBalance / 10**18), oethPoolBalance * 100 / totalPool)
143143
print("Pool Total ", "{:.6f}".format(totalPool / 10**18), totalPool)
144144
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))

brownie/world.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
oeth_vault_admin = load_contract('vault_admin', OETH_VAULT)
8989
oeth_vault_core = load_contract('vault_core', OETH_VAULT)
9090
oeth_metapool = load_contract('oeth_metapool', OETH_METAPOOL)
91+
oeth_curve_pool = load_contract('ousd_curve_pool', OETH_CURVE_POOL)
9192

9293
woeth = load_contract('wrapped_ousd', WOETH)
9394
ccip_router = load_contract('ccip_router', CCIP_ROUTER)
2.18 KB
Loading

contracts/docs/plantuml/oethContracts.puml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ object "ConvexEthMetaStrategy" as cvxStrat <<Origin>><<Proxy>> #$originColor {
6161
Rewards: CRV, CVX
6262
}
6363

64+
object "CurveAMOStrategy" as amoStrat <<Origin>><<Proxy>> #$originColor {
65+
asset: WETH
66+
Curve pool: OETH/WETH
67+
Rewards: CRV
68+
}
69+
6470
object "NativeStakingStrategy" as nativeStrat <<Origin>><<Proxy>> #$originColor {
6571
assets: WETH, ETH
6672
Rewards: ETH, SSV
@@ -182,6 +188,11 @@ harv <..> cvxStrat
182188
oethv <...> cvxStrat
183189
oeth <... cvxStrat
184190

191+
' Curve AMO Strategy
192+
harv <..> amoStrat
193+
oethv <...> amoStrat
194+
oeth <... amoStrat
195+
185196
harv <..> nativeStrat
186197
oethv <...> nativeStrat
187198
nativeStrat <..> feeAcc

0 commit comments

Comments
 (0)