Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into clement/pool-booster-curve
  • Loading branch information
clement-ux committed Dec 30, 2024
2 parents 8aeab0e + 8449003 commit 566f543
Show file tree
Hide file tree
Showing 23 changed files with 2,615 additions and 71 deletions.
1 change: 1 addition & 0 deletions brownie/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
BRIDGED_WOETH_BASE = '0xD8724322f44E5c58D7A815F542036fb17DbbF839'
AERO_BASE = '0x940181a94A35A4569E4529A3CDfB74e38FD98631'
OGN_BASE = '0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7'
USDC_BASE = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
AERODROME_SWAP_ROUTER_BASE = '0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5'
AERODROME_ROUTER2_BASE = '0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43'
AERODROME_POSITION_MANAGER_BASE = '0x827922686190790b37229fd06084350E74485b72'
Expand Down
41 changes: 41 additions & 0 deletions brownie/runlogs/2024_12_strategist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -------------------------------------
# Dec 27, 2024 - Withdraw from 3rd Native Staking Strategy and Deposit to AMO
# -------------------------------------
from world import *

def main():
with TemporaryForkForReallocations() as txs:
# Before
txs.append(vault_oeth_core.rebase(std))
txs.append(oeth_vault_value_checker.takeSnapshot(std))

# Remove 736 WETH from 3rd Native Staking Strategy
txs.append(
vault_oeth_admin.withdrawFromStrategy(
OETH_NATIVE_STAKING_3_STRAT,
[weth],
[1440 * 10**18],
{'from': STRATEGIST}
)
)

# Deposit WETH to AMO
txs.append(
vault_oeth_admin.depositToStrategy(
OETH_CONVEX_OETH_ETH_STRAT,
[WETH],
[1440 * 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, (1 * 10**18), vault_change, (1 * 10**18), std))
print("-----")
print("Profit", "{:.6f}".format(profit / 10**18), profit)
print("OETH supply change", "{:.6f}".format(supply_change / 10**18), supply_change)
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
print("-----")
3 changes: 3 additions & 0 deletions brownie/world_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def load_contract(name, address):
# unlock an address to issue transactions as that address
def unlock(address):
brownie.network.web3.provider.make_request('hardhat_impersonateAccount', [address])
# unlock an address to issue transactions as that address
def anvil_unlock(address):
brownie.network.web3.provider.make_request('anvil_impersonateAccount', [address])

def fund_eth(address, balance):
brownie.network.web3.provider.make_request('hardhat_setBalance', [address, balance])
Expand Down
3 changes: 3 additions & 0 deletions brownie/world_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

weth = load_contract('weth', WETH_BASE)
aero = load_contract('ERC20', AERO_BASE)
usdc = load_contract('ERC20', USDC_BASE)
oethb = load_contract('ousd', OETHB)
woeth = load_contract('ERC20', BRIDGED_WOETH_BASE)

Expand Down Expand Up @@ -32,6 +33,8 @@
decimalsMap = {
AERO_BASE: 18,
WETH_BASE: 18,
USDC_BASE: 6,
OETHB: 18,
'human': 0,
}

Expand Down
3 changes: 2 additions & 1 deletion contracts/deploy/mainnet/112_ousd_morpho_gauntlet_usdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ module.exports = deploymentWithGovernanceProposal(
// forceSkip: true,
reduceQueueTime: true,
deployerIsProposer: false,
// proposalId: "",
proposalId:
"75087811221559915489997248701865604408180819987973892712738892811928200381194",
},
async ({ deployWithConfirmation, getTxOpts, withConfirmation }) => {
// Current OUSD Vault contracts
Expand Down
3 changes: 2 additions & 1 deletion contracts/deploy/mainnet/113_ousd_morpho_gauntlet_usdt.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ module.exports = deploymentWithGovernanceProposal(
// forceSkip: true,
reduceQueueTime: true,
deployerIsProposer: false,
// proposalId: "",
proposalId:
"81633492285999845572989946154472567378435839827604776411913516896058378421073",
},
async ({ deployWithConfirmation, getTxOpts, withConfirmation }) => {
// Current OUSD Vault contracts
Expand Down
4 changes: 3 additions & 1 deletion contracts/deployments/mainnet/.migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@
"106_ousd_metamorpho_usdc": 1725548135,
"107_arm_buyback": 1726909418,
"109_3rd_native_ssv_staking": 1731456871,
"111_morpho_wrap_and_transfer": 1732639817
"111_morpho_wrap_and_transfer": 1732639817,
"112_ousd_morpho_gauntlet_usdc": 1734483227,
"113_ousd_morpho_gauntlet_usdt": 1734560711
}
78 changes: 39 additions & 39 deletions contracts/deployments/mainnet/Generalized4626Strategy.json

Large diffs are not rendered by default.

Loading

0 comments on commit 566f543

Please sign in to comment.