From 817cb5269751dbd7d43e371b36cc2b736b184c24 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:26:25 +0530 Subject: [PATCH 1/2] feat: add vip for bootstrap liquidity for Optimism markets --- simulations/vip-371/abi/ERC20.json | 295 +++++++++++++++++++++++++ simulations/vip-371/abi/VTreasury.json | 83 +++++++ simulations/vip-371/bscmainnet.ts | 52 +++++ vips/vip-371/bscmainnet.ts | 41 ++++ 4 files changed, 471 insertions(+) create mode 100644 simulations/vip-371/abi/ERC20.json create mode 100644 simulations/vip-371/abi/VTreasury.json create mode 100644 simulations/vip-371/bscmainnet.ts create mode 100644 vips/vip-371/bscmainnet.ts diff --git a/simulations/vip-371/abi/ERC20.json b/simulations/vip-371/abi/ERC20.json new file mode 100644 index 000000000..374b04c75 --- /dev/null +++ b/simulations/vip-371/abi/ERC20.json @@ -0,0 +1,295 @@ +[ + { + "inputs": [ + { "internalType": "string", "name": "name_", "type": "string" }, + { "internalType": "string", "name": "symbol_", "type": "string" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, + { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, + { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC712_VERSION", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PREDICATE_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "userAddress", "type": "address" }, + { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, + { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, + { "internalType": "uint8", "name": "sigV", "type": "uint8" } + ], + "name": "executeMetaTransaction", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getChainId", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getDomainSeperator", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getNonce", + "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], + "name": "getRoleAdmin", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "uint256", "name": "index", "type": "uint256" } + ], + "name": "getRoleMember", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], + "name": "getRoleMemberCount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "hasRole", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/simulations/vip-371/abi/VTreasury.json b/simulations/vip-371/abi/VTreasury.json new file mode 100644 index 000000000..df5a655ee --- /dev/null +++ b/simulations/vip-371/abi/VTreasury.json @@ -0,0 +1,83 @@ +[ + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "indexed": false, "internalType": "address", "name": "withdrawAddress", "type": "address" } + ], + "name": "WithdrawTreasuryBEP20", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "indexed": false, "internalType": "address", "name": "withdrawAddress", "type": "address" } + ], + "name": "WithdrawTreasuryBNB", + "type": "event" + }, + { "payable": true, "stateMutability": "payable", "type": "fallback" }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "internalType": "address", "name": "withdrawAddress", "type": "address" } + ], + "name": "withdrawTreasuryBEP20", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "internalType": "address payable", "name": "withdrawAddress", "type": "address" } + ], + "name": "withdrawTreasuryBNB", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + } +] diff --git a/simulations/vip-371/bscmainnet.ts b/simulations/vip-371/bscmainnet.ts new file mode 100644 index 000000000..dfae72b6f --- /dev/null +++ b/simulations/vip-371/bscmainnet.ts @@ -0,0 +1,52 @@ +import { expect } from "chai"; +import { BigNumber, Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { expectEvents } from "../../src/utils"; +import { forking, testVip } from "../../src/vip-framework"; +import vip371, { COMMUNITY_WALLET, TOKEN_REDEEMER, TREASURY, VUSDC, VUSDC_AMOUNT } from "../../vips/vip-371/bscmainnet"; +import ERC20_ABI from "./abi/ERC20.json"; +import VTreasurey_ABI from "./abi/VTreasury.json"; + +const USDC = "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"; + +forking(42532215, async () => { + let usdc: Contract; + let vusdc: Contract; + let prevBalanceCommunityWallet: BigNumber; + let prevTreasuryBalance: BigNumber; + + before(async () => { + usdc = new ethers.Contract(USDC, ERC20_ABI, ethers.provider); + vusdc = new ethers.Contract(VUSDC, ERC20_ABI, ethers.provider); + prevBalanceCommunityWallet = await usdc.balanceOf(COMMUNITY_WALLET); + prevTreasuryBalance = await vusdc.balanceOf(TREASURY); + }); + + testVip("VIP-371 Transfer bootstrap liquidity needed for Optimism to the Community wallet", await vip371(), { + callbackAfterExecution: async txResponse => { + await expectEvents(txResponse, [VTreasurey_ABI], ["WithdrawTreasuryBEP20"], [1]); + }, + }); + + describe("Post-VIP behavior", async () => { + it("should decrease vtreasury balance by the amount used to transfer vtoken corresponding to 25000 usdc", async () => { + expect(await vusdc.balanceOf(TREASURY)).to.closeTo(prevTreasuryBalance.sub(VUSDC_AMOUNT), parseUnits("500", 8)); + }); + + it("Should increase USDC balance of the community wallet", async () => { + const currUSDcBal = await usdc.balanceOf(COMMUNITY_WALLET); + const delta = currUSDcBal.sub(prevBalanceCommunityWallet); + expect(delta).to.be.equal(parseUnits("25000", 18)); + }); + + it("Leaves no USDC in the redeemer helper contract", async () => { + expect(await usdc.balanceOf(TOKEN_REDEEMER)).to.equal(0); + }); + + it("Leaves no vUSDC in the redeemer helper contract", async () => { + expect(await vusdc.balanceOf(TOKEN_REDEEMER)).to.equal(0); + }); + }); +}); diff --git a/vips/vip-371/bscmainnet.ts b/vips/vip-371/bscmainnet.ts new file mode 100644 index 000000000..ec9736e01 --- /dev/null +++ b/vips/vip-371/bscmainnet.ts @@ -0,0 +1,41 @@ +import { parseUnits } from "ethers/lib/utils"; + +import { ProposalType } from "../../src/types"; +import { makeProposal } from "../../src/utils"; + +export const VUSDC = "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8"; +export const TOKEN_REDEEMER = "0xC53ffda840B51068C64b2E052a5715043f634bcd"; +export const COMMUNITY_WALLET = "0xc444949e0054a23c44fc45789738bdf64aed2391"; +export const TREASURY = "0xF322942f644A996A617BD29c16bd7d231d9F35E9"; +export const VUSDC_AMOUNT = parseUnits("1022560", 8); // close to 25000 USDC, taking into account 1 USDC = 40.9 vUSDC with exchange rate of 244489614500844742686609163 +const USDC_AMOUNT = parseUnits("25000", 18); + +const vip371 = () => { + const meta = { + version: "v2", + title: "VIP-371 Bootstrap liquidity for the Optimism markets", + description: ``, + forDescription: "Execute this proposal", + againstDescription: "Do not execute this proposal", + abstainDescription: "Indifferent to execution", + }; + + return makeProposal( + [ + { + target: TREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [VUSDC, VUSDC_AMOUNT, TOKEN_REDEEMER], + }, + { + target: TOKEN_REDEEMER, + signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", + params: [VUSDC, COMMUNITY_WALLET, USDC_AMOUNT, TREASURY], + }, + ], + meta, + ProposalType.REGULAR, + ); +}; + +export default vip371; From 0da042b7ed0f896f0f60f1f2ec77296998d22f91 Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Tue, 24 Sep 2024 18:14:15 +0200 Subject: [PATCH 2/2] feat: set id and description for the VIP 373 --- .../{vip-371 => vip-373}/abi/ERC20.json | 0 .../{vip-371 => vip-373}/abi/VTreasury.json | 0 .../{vip-371 => vip-373}/bscmainnet.ts | 12 ++-- vips/vip-371/bscmainnet.ts | 41 ------------ vips/vip-373/bscmainnet.ts | 64 +++++++++++++++++++ 5 files changed, 70 insertions(+), 47 deletions(-) rename simulations/{vip-371 => vip-373}/abi/ERC20.json (100%) rename simulations/{vip-371 => vip-373}/abi/VTreasury.json (100%) rename simulations/{vip-371 => vip-373}/bscmainnet.ts (76%) delete mode 100644 vips/vip-371/bscmainnet.ts create mode 100644 vips/vip-373/bscmainnet.ts diff --git a/simulations/vip-371/abi/ERC20.json b/simulations/vip-373/abi/ERC20.json similarity index 100% rename from simulations/vip-371/abi/ERC20.json rename to simulations/vip-373/abi/ERC20.json diff --git a/simulations/vip-371/abi/VTreasury.json b/simulations/vip-373/abi/VTreasury.json similarity index 100% rename from simulations/vip-371/abi/VTreasury.json rename to simulations/vip-373/abi/VTreasury.json diff --git a/simulations/vip-371/bscmainnet.ts b/simulations/vip-373/bscmainnet.ts similarity index 76% rename from simulations/vip-371/bscmainnet.ts rename to simulations/vip-373/bscmainnet.ts index dfae72b6f..76547bfca 100644 --- a/simulations/vip-371/bscmainnet.ts +++ b/simulations/vip-373/bscmainnet.ts @@ -5,9 +5,9 @@ import { ethers } from "hardhat"; import { expectEvents } from "../../src/utils"; import { forking, testVip } from "../../src/vip-framework"; -import vip371, { COMMUNITY_WALLET, TOKEN_REDEEMER, TREASURY, VUSDC, VUSDC_AMOUNT } from "../../vips/vip-371/bscmainnet"; +import vip373, { COMMUNITY_WALLET, TOKEN_REDEEMER, TREASURY, VUSDC, VUSDC_AMOUNT } from "../../vips/vip-373/bscmainnet"; import ERC20_ABI from "./abi/ERC20.json"; -import VTreasurey_ABI from "./abi/VTreasury.json"; +import VTreasury_ABI from "./abi/VTreasury.json"; const USDC = "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"; @@ -24,9 +24,9 @@ forking(42532215, async () => { prevTreasuryBalance = await vusdc.balanceOf(TREASURY); }); - testVip("VIP-371 Transfer bootstrap liquidity needed for Optimism to the Community wallet", await vip371(), { + testVip("VIP-373 Transfer bootstrap liquidity needed for Optimism to the Community wallet", await vip373(), { callbackAfterExecution: async txResponse => { - await expectEvents(txResponse, [VTreasurey_ABI], ["WithdrawTreasuryBEP20"], [1]); + await expectEvents(txResponse, [VTreasury_ABI], ["WithdrawTreasuryBEP20"], [1]); }, }); @@ -36,8 +36,8 @@ forking(42532215, async () => { }); it("Should increase USDC balance of the community wallet", async () => { - const currUSDcBal = await usdc.balanceOf(COMMUNITY_WALLET); - const delta = currUSDcBal.sub(prevBalanceCommunityWallet); + const currUSDCBal = await usdc.balanceOf(COMMUNITY_WALLET); + const delta = currUSDCBal.sub(prevBalanceCommunityWallet); expect(delta).to.be.equal(parseUnits("25000", 18)); }); diff --git a/vips/vip-371/bscmainnet.ts b/vips/vip-371/bscmainnet.ts deleted file mode 100644 index ec9736e01..000000000 --- a/vips/vip-371/bscmainnet.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { parseUnits } from "ethers/lib/utils"; - -import { ProposalType } from "../../src/types"; -import { makeProposal } from "../../src/utils"; - -export const VUSDC = "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8"; -export const TOKEN_REDEEMER = "0xC53ffda840B51068C64b2E052a5715043f634bcd"; -export const COMMUNITY_WALLET = "0xc444949e0054a23c44fc45789738bdf64aed2391"; -export const TREASURY = "0xF322942f644A996A617BD29c16bd7d231d9F35E9"; -export const VUSDC_AMOUNT = parseUnits("1022560", 8); // close to 25000 USDC, taking into account 1 USDC = 40.9 vUSDC with exchange rate of 244489614500844742686609163 -const USDC_AMOUNT = parseUnits("25000", 18); - -const vip371 = () => { - const meta = { - version: "v2", - title: "VIP-371 Bootstrap liquidity for the Optimism markets", - description: ``, - forDescription: "Execute this proposal", - againstDescription: "Do not execute this proposal", - abstainDescription: "Indifferent to execution", - }; - - return makeProposal( - [ - { - target: TREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [VUSDC, VUSDC_AMOUNT, TOKEN_REDEEMER], - }, - { - target: TOKEN_REDEEMER, - signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", - params: [VUSDC, COMMUNITY_WALLET, USDC_AMOUNT, TREASURY], - }, - ], - meta, - ProposalType.REGULAR, - ); -}; - -export default vip371; diff --git a/vips/vip-373/bscmainnet.ts b/vips/vip-373/bscmainnet.ts new file mode 100644 index 000000000..0c8d4a9b6 --- /dev/null +++ b/vips/vip-373/bscmainnet.ts @@ -0,0 +1,64 @@ +import { parseUnits } from "ethers/lib/utils"; + +import { ProposalType } from "../../src/types"; +import { makeProposal } from "../../src/utils"; + +export const VUSDC = "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8"; +export const TOKEN_REDEEMER = "0xC53ffda840B51068C64b2E052a5715043f634bcd"; +export const COMMUNITY_WALLET = "0xc444949e0054a23c44fc45789738bdf64aed2391"; +export const TREASURY = "0xF322942f644A996A617BD29c16bd7d231d9F35E9"; +export const VUSDC_AMOUNT = parseUnits("1022560", 8); // close to 25000 USDC, taking into account 1 USDC = 40.9 vUSDC with exchange rate of 244489614500844742686609163 +const USDC_AMOUNT = parseUnits("25000", 18); + +const vip373 = () => { + const meta = { + version: "v2", + title: "VIP-373 Bootstrap liquidity for the Optimism markets", + description: `#### Summary + +If passed, this VIP will transfer 25,000 USDC from the [Venus Treasury on BNB Chain](https://bscscan.com/address/0xf322942f644a996a617bd29c16bd7d231d9f35e9) to the [Community wallet](https://bscscan.com/address/0xc444949e0054A23c44Fc45789738bdF64aed2391). These tokens will be used for the bootstrap liquidity of the new Venus markets on Optimism: USDC, USDT, WETH, WBTC, OP, following the [Chaos labs recommendations](https://community.venus.io/t/deploy-venus-protocol-on-op-mainnet/4512/9). + +#### Description + +The transferred tokens will be partially used by the Community wallet to get the rest of the needed tokens for the bootstrap liquidity in the new Venus markets to be deployed to Optimism. + +The next steps will be: + +- Transfer USDC to the Community wallet. This VIP +- The Community wallet: + - swaps 5,000 USDC for USDT + - swaps 5,000 USDC for WBTC + - swaps 5,000 USDC for WETH + - swaps 5,000 USDC for OP +- The Community wallet sends to the [Venus Treasury on Optimism](https://optimistic.etherscan.io/address/0x104c01EB7b4664551BE6A9bdB26a8C5c6Be7d3da) 100% of the received tokens after swapping USDC + +#### References + +- [VIP simulation](https://github.com/VenusProtocol/vips/pull/393) +- [Deploy Venus Protocol on OP Mainnet](https://community.venus.io/t/deploy-venus-protocol-on-op-mainnet/4512) +- Snapshot “[Deploy Venus Protocol on OP Mainnet](https://snapshot.org/#/venus-xvs.eth/proposal/0xe2e59410d7c010600ec869132980f10a8694d78e9ece4b3702f973d1e0ecc93f)” +- [Documentation](https://docs-v4.venus.io/)`, + forDescription: "Execute this proposal", + againstDescription: "Do not execute this proposal", + abstainDescription: "Indifferent to execution", + }; + + return makeProposal( + [ + { + target: TREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [VUSDC, VUSDC_AMOUNT, TOKEN_REDEEMER], + }, + { + target: TOKEN_REDEEMER, + signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", + params: [VUSDC, COMMUNITY_WALLET, USDC_AMOUNT, TREASURY], + }, + ], + meta, + ProposalType.REGULAR, + ); +}; + +export default vip373;