Skip to content

Commit

Permalink
feat: set ID and description for VIP 456
Browse files Browse the repository at this point in the history
  • Loading branch information
chechu committed Feb 19, 2025
1 parent cb9dd66 commit 2edfb78
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { unichainmainnet } = NETWORK_ADDRESSES;
export const ACM = "0x1f12014c497a9d905155eB9BfDD9FaC6885e61d0";
const DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000000000000000000000000";

export const vip008 = () => {
export const vip009 = () => {
return makeProposal([
{
target: ACM,
Expand All @@ -16,4 +16,4 @@ export const vip008 = () => {
},
]);
};
export default vip008;
export default vip009;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { unichainsepolia } = NETWORK_ADDRESSES;
export const ACM = "0x854C064EA6b503A97980F481FA3B7279012fdeDd";
const DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000000000000000000000000";

export const vip008 = () => {
export const vip009 = () => {
return makeProposal([
{
target: ACM,
Expand All @@ -16,4 +16,4 @@ export const vip008 = () => {
},
]);
};
export default vip008;
export default vip009;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ethers } from "hardhat";
import { NETWORK_ADDRESSES } from "src/networkAddresses";
import { forking, pretendExecutingVip } from "src/vip-framework/index";

import vip008, { ACM } from "../../../proposals/unichainmainnet/vip-008";
import vip009, { ACM } from "../../../proposals/unichainmainnet/vip-009";
import ACM_ABI from "./abi/AccessControlManager.json";

const { unichainmainnet } = NETWORK_ADDRESSES;
Expand All @@ -27,7 +27,7 @@ forking(9147076, async () => {

describe("Post-VIP behavior", async () => {
before(async () => {
await pretendExecutingVip(await vip008());
await pretendExecutingVip(await vip009());
});

it("Normal Timelock has default admin role", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ethers } from "hardhat";
import { NETWORK_ADDRESSES } from "src/networkAddresses";
import { forking, pretendExecutingVip } from "src/vip-framework/index";

import vip008, { ACM } from "../../../proposals/unichainsepolia/vip-008";
import vip009, { ACM } from "../../../proposals/unichainsepolia/vip-009";
import ACM_ABI from "./abi/AccessControlManager.json";

const { unichainsepolia } = NETWORK_ADDRESSES;
Expand All @@ -27,7 +27,7 @@ forking(12516535, async () => {

describe("Post-VIP behavior", async () => {
before(async () => {
await pretendExecutingVip(await vip008());
await pretendExecutingVip(await vip009());
});

it("Normal Timelock has default admin role", async () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LzChainId } from "src/types";
import { expectEvents } from "src/utils";
import { forking, testVip } from "src/vip-framework";

import vip455, { MAX_DAILY_LIMIT, OMNICHAIN_PROPOSAL_SENDER } from "../../vips/vip-455/bscmainnet";
import vip456, { MAX_DAILY_LIMIT, OMNICHAIN_PROPOSAL_SENDER } from "../../vips/vip-456/bscmainnet";
import ACCESS_CONTROL_MANAGER_ABI from "./abi/AccessControlManager_ABI.json";
import OMNICHAIN_PROPOSAL_SENDER_ABI from "./abi/OmnichainProposalSender.json";

Expand All @@ -27,7 +27,7 @@ forking(46771559, async () => {
});
});

testVip("vip455 give permissions to timelock", await vip455(), {
testVip("vip456 give permissions to timelock", await vip456(), {
callbackAfterExecution: async txResponse => {
await expectEvents(
txResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LzChainId } from "src/types";
import { expectEvents } from "src/utils";
import { forking, testVip } from "src/vip-framework";

import vip455, { MAX_DAILY_LIMIT, OMNICHAIN_PROPOSAL_SENDER } from "../../vips/vip-455/bsctestnet";
import vip456, { MAX_DAILY_LIMIT, OMNICHAIN_PROPOSAL_SENDER } from "../../vips/vip-456/bsctestnet";
import ACCESS_CONTROL_MANAGER_ABI from "./abi/AccessControlManager_ABI.json";
import OMNICHAIN_PROPOSAL_SENDER_ABI from "./abi/OmnichainProposalSender.json";

Expand All @@ -27,7 +27,7 @@ forking(48215809, async () => {
});
});

testVip("vip455 give permissions to timelock", await vip455(), {
testVip("vip456 give permissions to timelock", await vip456(), {
callbackAfterExecution: async txResponse => {
await expectEvents(
txResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { LzChainId } from "src/types";
import { expectEvents, getOmnichainProposalSenderAddress } from "src/utils";
import { forking, pretendExecutingVip, testForkedNetworkVipCommands } from "src/vip-framework";

import vip008 from "../../multisig/proposals/unichainmainnet/vip-008";
import vip455, {
import vip009 from "../../multisig/proposals/unichainmainnet/vip-009";
import vip456, {
ACM,
ACM_AGGREGATOR,
DEFAULT_ADMIN_ROLE,
OMNICHAIN_EXECUTOR_OWNER,
} from "../../vips/vip-455/bscmainnet";
} from "../../vips/vip-456/bscmainnet";
import ACMAggregator_ABI from "./abi/ACMAggregator.json";
import ACCESS_CONTROL_MANAGER_ABI from "./abi/AccessControlManager_ABI.json";
import OMNICHAIN_EXECUTOR_OWNER_ABI from "./abi/OmnichainExecutorOwner_ABI.json";
Expand All @@ -36,7 +36,7 @@ forking(9147076, async () => {
);
executorOwner = new ethers.Contract(OMNICHAIN_EXECUTOR_OWNER, OMNICHAIN_EXECUTOR_OWNER_ABI, provider);
lastProposalReceived = await executor.lastProposalReceived();
await pretendExecutingVip(await vip008());
await pretendExecutingVip(await vip009());
});

describe("Pre-VIP behaviour", async () => {
Expand All @@ -47,7 +47,7 @@ forking(9147076, async () => {
});
});

testForkedNetworkVipCommands("vip455 configures bridge", await vip455(), {
testForkedNetworkVipCommands("vip456 configures bridge", await vip456(), {
callbackAfterExecution: async txResponse => {
await expectEvents(txResponse, [ACCESS_CONTROL_MANAGER_ABI], ["PermissionGranted"], [223]);
await expectEvents(txResponse, [ACMAggregator_ABI], ["GrantPermissionsExecuted"], [2]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { LzChainId } from "src/types";
import { expectEvents, getOmnichainProposalSenderAddress } from "src/utils";
import { forking, pretendExecutingVip, testForkedNetworkVipCommands } from "src/vip-framework";

import vip008 from "../../multisig/proposals/unichainsepolia/vip-008";
import vip455, {
import vip009 from "../../multisig/proposals/unichainsepolia/vip-009";
import vip456, {
ACM,
ACM_AGGREGATOR,
DEFAULT_ADMIN_ROLE,
OMNICHAIN_EXECUTOR_OWNER,
} from "../../vips/vip-455/bsctestnet";
} from "../../vips/vip-456/bsctestnet";
import ACMAggregator_ABI from "./abi/ACMAggregator.json";
import ACCESS_CONTROL_MANAGER_ABI from "./abi/AccessControlManager_ABI.json";
import OMNICHAIN_EXECUTOR_OWNER_ABI from "./abi/OmnichainExecutorOwner_ABI.json";
Expand All @@ -36,7 +36,7 @@ forking(12517026, async () => {
);
executorOwner = new ethers.Contract(OMNICHAIN_EXECUTOR_OWNER, OMNICHAIN_EXECUTOR_OWNER_ABI, provider);
lastProposalReceived = await executor.lastProposalReceived();
await pretendExecutingVip(await vip008());
await pretendExecutingVip(await vip009());
});

describe("Pre-VIP behaviour", async () => {
Expand All @@ -47,7 +47,7 @@ forking(12517026, async () => {
});
});

testForkedNetworkVipCommands("vip455 configures bridge", await vip455(), {
testForkedNetworkVipCommands("vip456 configures bridge", await vip456(), {
callbackAfterExecution: async txResponse => {
await expectEvents(txResponse, [ACCESS_CONTROL_MANAGER_ABI], ["PermissionGranted"], [223]);
await expectEvents(txResponse, [ACMAggregator_ABI], ["GrantPermissionsExecuted"], [2]);
Expand Down
76 changes: 0 additions & 76 deletions vips/vip-455/bscmainnet.ts

This file was deleted.

120 changes: 120 additions & 0 deletions vips/vip-456/bscmainnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import { NETWORK_ADDRESSES } from "src/networkAddresses";
import { LzChainId, ProposalType } from "src/types";
import { makeProposal } from "src/utils";

const { unichainmainnet } = NETWORK_ADDRESSES;
export const OMNICHAIN_PROPOSAL_SENDER = "0x36a69dE601381be7b0DcAc5D5dD058825505F8f6";

export const OMNICHAIN_EXECUTOR_OWNER = "0x6E78a0d96257F8F2615d72F3ee48cb6fb2c970bd";
export const ACM = "0x1f12014c497a9d905155eB9BfDD9FaC6885e61d0";
export const DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000000000000000000000000";
export const ACM_AGGREGATOR = "0x904D11b00bdB2740d16176cc00DE139d0d626115";
export const MAX_DAILY_LIMIT = 100;

const vip456 = () => {
const meta = {
version: "v2",
title: "VIP-456 [Unichain] Omnichain Governance",
description: `#### Summary
If passed, this VIP will enable the Omnichain Governance system on the Venus protocol, for Unichain. Omnichain Governance will allow the Venus Community to propose VIP’s on BNB Chain including commands to be executed on Unichain.
#### Description
This VIP will grant permissions to [Normal](https://bscscan.com/address/0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396), [Fast-track](https://bscscan.com/address/0x555ba73dB1b006F3f2C7dB7126d6e4343aDBce02) and [Critical](https://bscscan.com/address/0x213c446ec11e45b15a6E29C1C1b402B8897f606d) timelocks on BNB Chain to create remote VIP’s on Unichain. It also performs the necessary configuration of [OmnichainProposalSender](https://bscscan.com/address/0x36a69dE601381be7b0DcAc5D5dD058825505F8f6) on BNB Chain and [OmnichainGovernanceExecutor](https://uniscan.xyz/address/0x3E281461efb3D53EC20DB207674373Ed8Ef3BbA9) on Unichain (set the trustworthiness relationships, configure limits, accept ownerships).
#### Security and additional considerations
We applied the following security procedures for this upgrade:
- **VIP execution simulation**: in a simulation environment, checking ownership of the contracts
- **Deployment on testnet**: the same contracts have been deployed to testnet, and used in the Venus Protocol testnet deployment
- **Audit**: [OpenZeppelin](https://www.openzeppelin.com/), [Quantstamp](https://quantstamp.com/), [Cantina](https://cantina.xyz/) and [Certik](https://www.certik.com/) have audited the Omnichain Governance contracts.
#### Audit reports
- [Openzepplin audit report - 2024/01/19](https://github.com/VenusProtocol/governance-contracts/blob/feat/ven-1918/audits/084_multichainGovernance_openzeppelin_20240119.pdf)
- [Quantstamp audit report - 2024/04/29](https://github.com/VenusProtocol/governance-contracts/blob/feat/ven-1918/audits/106_multichainGovernance_quantstamp_20240429.pdf)
- [Cantina audit report - 2024/04/25](https://github.com/VenusProtocol/governance-contracts/blob/feat/ven-1918/audits/105_multichainGovernance_cantina_20240425.pdf)
- [Certik audit report - 2024/02/26](https://github.com/VenusProtocol/governance-contracts/blob/feat/ven-1918/audits/085_multichainGovernance_certik_20240226.pdf)
- [Certik audit report of ACMCommandsAggregator - 2024/10/07](https://github.com/VenusProtocol/governance-contracts/blob/3a5a2740e86c9137ab17f4f3939c97b145a22803/audits/118_ACMCommandsAggregator_certik_20241007.pdf)
#### Deployed contracts on Unichain
- Normal Timelock: [0x918532A78d22419Da4091930d472bDdf532BE89a](https://uniscan.xyz/address/0x918532A78d22419Da4091930d472bDdf532BE89a)
- FastTrack Timelock: [0x4121995b87f9EE8bA0a89e87470255e2E0fe48c7](https://uniscan.xyz/address/0x4121995b87f9EE8bA0a89e87470255e2E0fe48c7)
- Critical Timelock: [0x1b05eCb489842786776a9A10e91AAb56e2CFe15e](https://uniscan.xyz/address/0x1b05eCb489842786776a9A10e91AAb56e2CFe15e)
- Omnichain Governance Executor: [0x3E281461efb3D53EC20DB207674373Ed8Ef3BbA9](https://uniscan.xyz/address/0x3E281461efb3D53EC20DB207674373Ed8Ef3BbA9)
- Omnichain Executor Owner Proxy: [0x6E78a0d96257F8F2615d72F3ee48cb6fb2c970bd](https://uniscan.xyz/address/0x6E78a0d96257F8F2615d72F3ee48cb6fb2c970bd)
- ACMCommandsAggregator: [0x904D11b00bdB2740d16176cc00DE139d0d626115](https://uniscan.xyz/address/0x904D11b00bdB2740d16176cc00DE139d0d626115)
#### References
- [VIP simulation](https://github.com/VenusProtocol/vips/pull/498)
- [Deploy Venus on Unichain](https://community.venus.io/t/deploy-venus-on-unichain/4859)
- Snapshot ["Deploy Venus on Unichain"](https://snapshot.box/#/s:venus-xvs.eth/proposal/0xbf2fff03c4f84620a8b3ece2e31d879224ee03c42aefc6dc94e9c2b40a5a634b)
- [Code of Omnichain Governance](https://github.com/VenusProtocol/governance-contracts/pull/21)
- [Documentation - Technical article with more details of the Omnichain Governance feature](https://docs-v4.venus.io/technical-reference/reference-technical-articles/omnichain-governance)
- [Documentation](https://docs-v4.venus.io/)
#### Disclaimer for Unichain VIPs
Privilege commands on Unichain will be executed by the [Guardian wallet](https://uniscan.xyz/address/0x1803Cf1D3495b43cC628aa1d8638A981F8CD341C), until the [Omnichain Governance](https://docs-v4.venus.io/technical-reference/reference-technical-articles/omnichain-governance) contracts are fully enabled. If this VIP passes, [this](https://app.safe.global/transactions/tx?safe=unichain:0x1803Cf1D3495b43cC628aa1d8638A981F8CD341C&id=multisig_0x1803Cf1D3495b43cC628aa1d8638A981F8CD341C_0xdf9f020eb83bf3e68d6511c6a4e0ee4ed5f1529b82f7fcd71db27f856ee18ea5) multisig transaction will be executed. Otherwise, it will be rejected.`,
forDescription: "I agree that Venus Protocol should proceed with this proposal",
againstDescription: "I do not think that Venus Protocol should proceed with this proposal",
abstainDescription: "I am indifferent to whether Venus Protocol proceeds or not",
};
return makeProposal(
[
{
target: OMNICHAIN_PROPOSAL_SENDER,
signature: "setMaxDailyLimit(uint16,uint256)",
params: [LzChainId.unichainmainnet, MAX_DAILY_LIMIT],
},
{
target: OMNICHAIN_PROPOSAL_SENDER,
signature: "setTrustedRemoteAddress(uint16,bytes)",
params: [LzChainId.unichainmainnet, unichainmainnet.OMNICHAIN_GOVERNANCE_EXECUTOR],
},
{
target: OMNICHAIN_EXECUTOR_OWNER,
signature: "acceptOwnership()",
params: [],
dstChainId: LzChainId.unichainmainnet,
},
{
target: ACM,
signature: "grantRole(bytes32,address)",
params: [DEFAULT_ADMIN_ROLE, ACM_AGGREGATOR],
dstChainId: LzChainId.unichainmainnet,
},
{
target: ACM_AGGREGATOR,
signature: "executeGrantPermissions(uint256)",
params: [2],
dstChainId: LzChainId.unichainmainnet,
},
{
target: ACM_AGGREGATOR,
signature: "executeGrantPermissions(uint256)",
params: [3],
dstChainId: LzChainId.unichainmainnet,
},
{
target: ACM_AGGREGATOR,
signature: "executeRevokePermissions(uint256)",
params: [1],
dstChainId: LzChainId.unichainmainnet,
},
{
target: ACM,
signature: "revokeRole(bytes32,address)",
params: [DEFAULT_ADMIN_ROLE, ACM_AGGREGATOR],
dstChainId: LzChainId.unichainmainnet,
},
],
meta,
ProposalType.REGULAR,
);
};
export default vip456;
6 changes: 3 additions & 3 deletions vips/vip-455/bsctestnet.ts → vips/vip-456/bsctestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export const DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000
export const ACM_AGGREGATOR = "0xb0067C9CD83B00DE781e9b456Bf0Fec86D687Bb2";
export const MAX_DAILY_LIMIT = 100;

const vip455 = () => {
const vip456 = () => {
const meta = {
version: "v2",
title: "VIP-455 Enable Multichain Governance on unichain sepolia",
title: "VIP-456 Enable Multichain Governance on unichain sepolia",
description: `### Summary`,
forDescription: "I agree that Venus Protocol should proceed with this proposal",
againstDescription: "I do not think that Venus Protocol should proceed with this proposal",
Expand Down Expand Up @@ -73,4 +73,4 @@ const vip455 = () => {
ProposalType.REGULAR,
);
};
export default vip455;
export default vip456;

0 comments on commit 2edfb78

Please sign in to comment.