Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into nicka/sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Jan 6, 2025
2 parents e6d9102 + 3e565bf commit a01fe3d
Show file tree
Hide file tree
Showing 22 changed files with 2,645 additions and 66 deletions.
4 changes: 4 additions & 0 deletions brownie/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
FLUX_STRAT = '0x76bf500b6305dc4ea851384d3d5502f1c7a0ed44'
MAKER_DSR_STRAT = '0x6b69B755C629590eD59618A2712d8a2957CA98FC'

MORPHO_GAUNTLET_PRIME_USDC_STRAT = '0x2b8f37893ee713a4e9ff0ceb79f27539f20a32a1'
MORPHO_GAUNTLET_PRIME_USDT_STRAT = '0xe3ae7c80a1b02ccd3fb0227773553aeb14e32f26'

# OETH Contracts
OETH = '0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3'
WOETH = '0xdcee70654261af21c44c093c300ed3bb97b78192'
Expand Down Expand Up @@ -73,6 +76,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
59 changes: 59 additions & 0 deletions brownie/runlogs/2024_12_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,62 @@ def main():
print("OETH supply change", "{:.6f}".format(supply_change / 10**18), supply_change)
print("Vault Change", "{:.6f}".format(vault_change / 10**18), vault_change)
print("-----")

# -------------------------------------
# Dec 31, 2024 - Gauntlet Prime USDT and USDC
# -------------------------------------
from world import *

def main():
with TemporaryForkForReallocations() as txs:
txs.append(vault_core.rebase(std))

txs.append(vault_value_checker.takeSnapshot(std))

txs.append(
vault_admin.withdrawFromStrategy(
AAVE_STRAT,
[usdt],
[8000 * 10**6],
std
)
)

txs.append(
vault_admin.depositToStrategy(
MORPHO_GAUNTLET_PRIME_USDT_STRAT,
[usdt],
[10_000 * 10**6],
std
)
)

txs.append(
vault_admin.depositToStrategy(
MORPHO_GAUNTLET_PRIME_USDC_STRAT,
[usdc],
[10_000 * 10**6],
std
)
)

profit = vault_core.totalValue() - vault_value_checker.snapshots(STRATEGIST)[0]
vault_change = vault_core.totalValue() - vault_value_checker.snapshots(STRATEGIST)[0]
supply_change = ousd.totalSupply() - vault_value_checker.snapshots(STRATEGIST)[1]
profit = vault_change - supply_change

txs.append(
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
5 changes: 3 additions & 2 deletions contracts/deploy/mainnet/112_ousd_morpho_gauntlet_usdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ module.exports = deploymentWithGovernanceProposal(
deployName: "112_ousd_morpho_gauntlet_usdc",
forceDeploy: false,
// forceSkip: true,
// reduceQueueTime: true,
reduceQueueTime: true,
deployerIsProposer: false,
// proposalId: "",
proposalId:
"75087811221559915489997248701865604408180819987973892712738892811928200381194",
},
async ({ deployWithConfirmation, getTxOpts, withConfirmation }) => {
// Current OUSD Vault contracts
Expand Down
5 changes: 3 additions & 2 deletions contracts/deploy/mainnet/113_ousd_morpho_gauntlet_usdt.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ module.exports = deploymentWithGovernanceProposal(
deployName: "113_ousd_morpho_gauntlet_usdt",
forceDeploy: false,
// forceSkip: true,
// reduceQueueTime: 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 a01fe3d

Please sign in to comment.