Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into clement/simple-harv…
Browse files Browse the repository at this point in the history
…ester-v2
  • Loading branch information
naddison36 committed Jan 30, 2025
2 parents cd7ed01 + 477e67e commit 8fd1cae
Show file tree
Hide file tree
Showing 25 changed files with 326 additions and 22 deletions.
7 changes: 6 additions & 1 deletion brownie/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Governance
STRATEGIST = '0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC'
MULTICHAIN_STRATEGIST = '0x4FF1b9D9ba8558F5EAfCec096318eA0d8b541971'
GOVERNOR = '0x72426ba137dec62657306b12b1e869d43fec6ec7'
GOV_MULTISIG = '0xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d899'
ORIGINTEAM = '0x449e0b5564e0d141b3bc3829e74ffa0ea8c08ad5'
Expand Down Expand Up @@ -149,4 +150,8 @@

CCIP_ROUTER = "0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D"

ADDR_ZERO = '0x0000000000000000000000000000000000000000'
ADDR_ZERO = '0x0000000000000000000000000000000000000000'

EQUALIZER_SPECTRA_OETHB_BRIBE_CONTRACT = "0xaAbF246f6f4Fa87717690dE00896a49c18A944b9"

EQUALIZER_WETH_OETHB_BRIBE_CONTRACT = "0x4467B367c7EeF806E11756bFCD76D3801DFb942C"
65 changes: 65 additions & 0 deletions brownie/runlogs/2025_01_strategist.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,68 @@ def main():
print("-----")


# -------------------------------------
# Jan 29, 2025 - Equalizer Bribes
# -------------------------------------

from eth_abi.packed import encode_packed
from aerodrome_harvest import *
def main():
with TemporaryForkForReallocations() as txs:
# Swap WETH to superOETHb
amount = 0.02933972 * 10**18
txs.append(weth.approve(AERODROME_SWAP_ROUTER_BASE, amount, {'from': MULTICHAIN_STRATEGIST}))

oethb_path = encode_packed(
['address', 'int24', 'address'],
[
WETH_BASE,
1, # WETH > OETHb tickSpacing
OETHB,
]
).hex()

txs.append(
aero_router.exactInput(
swap_params_multiple(
amount,
oethb_path,
recipient=MULTICHAIN_STRATEGIST,
to_token=OETHB,
to_token_label="WETH"
),
{'from': MULTICHAIN_STRATEGIST}
)
)

# Bribe spectra/oethb pool
spectra_pool_bribe_amount = 0.01903247923 * 10**18
txs.append(
oethb.approve(EQUALIZER_SPECTRA_OETHB_BRIBE_CONTRACT, spectra_pool_bribe_amount, {'from': MULTICHAIN_STRATEGIST})
)

spectra_oethb_bribe_contract = load_contract("aero_bribes", EQUALIZER_SPECTRA_OETHB_BRIBE_CONTRACT)
txs.append(
spectra_oethb_bribe_contract.notifyRewardAmount(
OETHB,
spectra_pool_bribe_amount,
{'from': MULTICHAIN_STRATEGIST}
)
)

# Bribe weth/oethb pool
weth_pool_bribe_amount = 0.004425216108 * 10**18
txs.append(
oethb.approve(EQUALIZER_WETH_OETHB_BRIBE_CONTRACT, weth_pool_bribe_amount, {'from': MULTICHAIN_STRATEGIST})
)

weth_oethb_bribe_contract = load_contract("aero_bribes", EQUALIZER_WETH_OETHB_BRIBE_CONTRACT)
txs.append(
weth_oethb_bribe_contract.notifyRewardAmount(
OETHB,
weth_pool_bribe_amount,
{'from': MULTICHAIN_STRATEGIST}
)
)

print(to_gnosis_json(txs, MULTICHAIN_STRATEGIST, "1"))
2 changes: 1 addition & 1 deletion brownie/world.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from world_abstract import *

std = {'from': STRATEGIST}
std = {'from': MULTICHAIN_STRATEGIST}

# ousd = Contract.from_explorer(OUSD, as_proxy_for=OUSD_IMPL)
# usdt = Contract.from_explorer(USDT)
Expand Down
2 changes: 2 additions & 0 deletions contracts/contracts/interfaces/ITimelockController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ interface ITimelockController {
function getMinDelay() external view returns (uint256);

function updateDelay(uint256 newDelay) external;

function CANCELLER_ROLE() external view returns (bytes32);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { getTxOpts } = require("../../utils/tx");

module.exports = deployOnArb(
{
deployName: "084_deploy_woeth_on_arb",
deployName: "001_deploy_woeth_on_arb",
},
async ({ ethers }) => {
const { deployerAddr } = await getNamedAccounts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { impersonateAndFund } = require("../../utils/signers");

module.exports = deployOnArb(
{
deployName: "088_upgrade_woeth_on_arb",
deployName: "002_upgrade_woeth_on_arb",
},
async ({ ethers }) => {
const cWOETHProxy = await ethers.getContract("BridgedWOETHProxy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const { deployWithConfirmation } = require("../../utils/deploy");

module.exports = deployOnBaseWithGuardian(
{
deployName: "021_upgrade_oeth",
deployName: "022_upgrade_oeth",
// forceSkip: true,
},
async ({ ethers }) => {
const dOETHb = await deployWithConfirmation(
Expand Down
28 changes: 28 additions & 0 deletions contracts/deploy/base/023_update_weth_share.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const { deployOnBaseWithGuardian } = require("../../utils/deploy-l2");
const { utils } = require("ethers");

module.exports = deployOnBaseWithGuardian(
{
deployName: "023_update_weth_share",
},
async ({ ethers }) => {
const cAMOStrategyProxy = await ethers.getContract(
"AerodromeAMOStrategyProxy"
);
const cAMOStrategy = await ethers.getContractAt(
"AerodromeAMOStrategy",
cAMOStrategyProxy.address
);

return {
actions: [
{
// 1. Set WETH share to be 1% to 15%
contract: cAMOStrategy,
signature: "setAllowedPoolWethShareInterval(uint256,uint256)",
args: [utils.parseUnits("0.01", 18), utils.parseUnits("0.15", 18)],
},
],
};
}
);
27 changes: 27 additions & 0 deletions contracts/deploy/base/024_multisig_as_canceller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { deployOnBaseWithGuardian } = require("../../utils/deploy-l2");
const addresses = require("../../utils/addresses");

module.exports = deployOnBaseWithGuardian(
{
deployName: "024_multisig_as_canceller",
},
async ({ ethers }) => {
const cTimelock = await ethers.getContractAt(
"ITimelockController",
addresses.base.timelock
);

const timelockCancellerRole = await cTimelock.CANCELLER_ROLE();

return {
name: "Grant canceller role to 5/8 Multisig",
actions: [
{
contract: cTimelock,
signature: "grantRole(bytes32,address)",
args: [timelockCancellerRole, addresses.base.governor],
},
],
};
}
);
37 changes: 37 additions & 0 deletions contracts/deploy/mainnet/119_multisig_as_canceller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const { deploymentWithGovernanceProposal } = require("../../utils/deploy");
const addresses = require("../../utils/addresses");

module.exports = deploymentWithGovernanceProposal(
{
deployName: "119_multisig_as_canceller",
forceDeploy: false,
//forceSkip: true,
reduceQueueTime: true,
deployerIsProposer: false,
proposalId:
"68528526132026080998168122859635399048147530736160306492805070199180314362200",
},
async () => {
const { timelockAddr } = await getNamedAccounts();

const cTimelock = await ethers.getContractAt(
"ITimelockController",
timelockAddr
);

const timelockCancellerRole = await cTimelock.CANCELLER_ROLE();

// Governance Actions
// ----------------
return {
name: "Grant canceller role to 5/8 Multisig",
actions: [
{
contract: cTimelock,
signature: "grantRole(bytes32,address)",
args: [timelockCancellerRole, addresses.mainnet.Guardian],
},
],
};
}
);
43 changes: 43 additions & 0 deletions contracts/deploy/mainnet/120_remove_ousd_amo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const { deploymentWithGovernanceProposal } = require("../../utils/deploy");
const addresses = require("../../utils/addresses");

module.exports = deploymentWithGovernanceProposal(
{
deployName: "120_remove_ousd_amo",
forceDeploy: false,
//forceSkip: true,
reduceQueueTime: true,
deployerIsProposer: false,
proposalId:
"47377301530901645877668147419124102540503539821842750844128770769774878595548",
},
async () => {
const cOUSDVaultProxy = await ethers.getContract("VaultProxy");
const cOUSDVault = await ethers.getContractAt(
"IVault",
cOUSDVaultProxy.address
);

const cOUSDMetaStrategyProxy = await ethers.getContract(
"ConvexOUSDMetaStrategyProxy"
);

// Governance Actions
// ----------------
return {
name: "Remove OUSD AMO Strategy",
actions: [
{
contract: cOUSDVault,
signature: "removeStrategy(address)",
args: [cOUSDMetaStrategyProxy.address],
},
{
contract: cOUSDVault,
signature: "setOusdMetaStrategy(address)",
args: [addresses.zero],
},
],
};
}
);
25 changes: 25 additions & 0 deletions contracts/deploy/sonic/004_timelock_1d_delay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { deployOnSonic } = require("../../utils/deploy-l2");
const addresses = require("../../utils/addresses");

module.exports = deployOnSonic(
{
deployName: "004_timelock_1d_delay",
},
async ({ ethers }) => {
const cTimelock = await ethers.getContractAt(
"ITimelockController",
addresses.sonic.timelock
);

return {
actions: [
{
// 1. Update delay to 1d
contract: cTimelock,
signature: "updateDelay(uint256)",
args: [24 * 60 * 60],
},
],
};
}
);
27 changes: 27 additions & 0 deletions contracts/deploy/sonic/005_multisig_as_canceller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { deployOnSonic } = require("../../utils/deploy-l2");
const addresses = require("../../utils/addresses");

module.exports = deployOnSonic(
{
deployName: "005_multisig_as_canceller",
},
async ({ ethers }) => {
const cTimelock = await ethers.getContractAt(
"ITimelockController",
addresses.sonic.timelock
);

const timelockCancellerRole = await cTimelock.CANCELLER_ROLE();

return {
actions: [
{
// 1. Grant canceller role to 5/8 Multisig
contract: cTimelock,
signature: "grantRole(bytes32,address)",
args: [timelockCancellerRole, addresses.sonic.admin],
},
],
};
}
);
26 changes: 26 additions & 0 deletions contracts/deploy/sonic/006_yf_swpx_os_pool.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { deployOnSonic } = require("../../utils/deploy-l2");
const addresses = require("../../utils/addresses");

module.exports = deployOnSonic(
{
deployName: "006_yf_swpx_os_pool",
},
async ({ ethers }) => {
const cOSonicProxy = await ethers.getContract("OSonicProxy");
const cOSonic = await ethers.getContractAt("OSonic", cOSonicProxy.address);

return {
actions: [
{
// 1. Delegate the yield from the SwapX SWPx/OS pool to SwapX Treasury
contract: cOSonic,
signature: "delegateYield(address,address)",
args: [
addresses.sonic.SwapXSWPxOSPool,
addresses.sonic.SwapXTreasury,
],
},
],
};
}
);
4 changes: 2 additions & 2 deletions contracts/deployments/arbitrumOne/.migrations.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"084_deploy_woeth_on_arb": 1707820141,
"088_upgrade_woeth_on_arb": 1710959437
"001_deploy_woeth_on_arb": 1707820141,
"002_upgrade_woeth_on_arb": 1710959437
}
6 changes: 4 additions & 2 deletions contracts/deployments/base/.migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
"018_strategist_as_executor": 1729078818,
"019_async_withdrawals": 1730100488,
"020_upgrade_amo": 1730157451,
"021_multichain_strategist": 1736267102
}
"021_multichain_strategist": 1736267102,
"023_update_weth_share": 1737969363,
"024_multisig_as_canceller": 1737993822
}
5 changes: 4 additions & 1 deletion contracts/deployments/mainnet/.migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@
"112_ousd_morpho_gauntlet_usdc": 1734483227,
"113_ousd_morpho_gauntlet_usdt": 1734560711,
"114_simple_harvester": 1736329331,
"117_oeth_fixed_rate_dripper": 1736875175
"117_oeth_fixed_rate_dripper": 1736875175,
"118_multichain_strategist": 1736875175,
"119_multisig_as_canceller": 1737991984,
"120_remove_ousd_amo": 1737992146
}
7 changes: 5 additions & 2 deletions contracts/deployments/sonic/.migrations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"001_vault_and_token": 1736867284,
"002_oracle_router": 1737018791,
"003_sonic_staking_strategy": 1737523080
}
"003_sonic_staking_strategy": 1737523080,
"004_timelock_1d_delay": 1737667104,
"005_multisig_as_canceller": 1737993969,
"006_yf_swpx_os_pool": 1738198367
}
Loading

0 comments on commit 8fd1cae

Please sign in to comment.