From 342c15d6942cac21191a8abae6dca90ec7e8a443 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 22 Oct 2024 15:52:29 +0530 Subject: [PATCH 1/7] feat: transfer funds from treasury --- simulations/vip-390/abi/ERC20.json | 231 +++++++++++++++++++++++++ simulations/vip-390/abi/VTreasury.json | 83 +++++++++ simulations/vip-390/bscmainnet.ts | 63 +++++++ vips/vip-390/bscmainnet.ts | 78 +++++++++ 4 files changed, 455 insertions(+) create mode 100644 simulations/vip-390/abi/ERC20.json create mode 100644 simulations/vip-390/abi/VTreasury.json create mode 100644 simulations/vip-390/bscmainnet.ts create mode 100644 vips/vip-390/bscmainnet.ts diff --git a/simulations/vip-390/abi/ERC20.json b/simulations/vip-390/abi/ERC20.json new file mode 100644 index 000000000..02d30dd88 --- /dev/null +++ b/simulations/vip-390/abi/ERC20.json @@ -0,0 +1,231 @@ +[ + { "inputs": [], "payable": false, "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": true, "internalType": "address", "name": "previousOwner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "OwnershipTransferred", + "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" + }, + { + "constant": true, + "inputs": [], + "name": "_decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "burn", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getOwner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "mint", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "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": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "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" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/simulations/vip-390/abi/VTreasury.json b/simulations/vip-390/abi/VTreasury.json new file mode 100644 index 000000000..df5a655ee --- /dev/null +++ b/simulations/vip-390/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-390/bscmainnet.ts b/simulations/vip-390/bscmainnet.ts new file mode 100644 index 000000000..2a5b37a19 --- /dev/null +++ b/simulations/vip-390/bscmainnet.ts @@ -0,0 +1,63 @@ +import { expect } from "chai"; +import { BigNumber, Contract } from "ethers"; +import { ethers } from "hardhat"; + +import { expectEvents } from "../../src/utils"; +import { forking, testVip } from "../../src/vip-framework"; +import vip390, { + CERTIK, + CERTIK_AMOUNT_USDT, + CHAOS_LABS, + CHAOS_LABS_AMOUNT_USDC, + COMMUNITY, + COMMUNITY_BELNCRYPTO_AMOUNT_USDT, + COMMUNITY_SOURCECONTROL_AMOUNT_USDT, + USDC, + USDT, + VANGUARD_VINTAGE, + VANGUARD_VINTAGE_AMOUNT_USDT, +} from "../../vips/vip-390/bscmainnet"; +import ERC20_ABI from "./abi/ERC20.json"; +import VTREASURY_ABI from "./abi/VTreasury.json"; + +forking(43336691, async () => { + let usdc: Contract; + let usdt: Contract; + + let prevUSDTBalanceOfVanguard: BigNumber; + let prevUSDTBalanceOfCommunity: BigNumber; + let prevUSDCBalanceOfChaosLabs: BigNumber; + let prevUSDTBalanceOfCertik: BigNumber; + + before(async () => { + usdt = new ethers.Contract(USDT, ERC20_ABI, ethers.provider); + usdc = new ethers.Contract(USDC, ERC20_ABI, ethers.provider); + + prevUSDTBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VINTAGE); + prevUSDTBalanceOfCommunity = await usdt.balanceOf(COMMUNITY); + prevUSDCBalanceOfChaosLabs = await usdc.balanceOf(CHAOS_LABS); + prevUSDTBalanceOfCertik = await usdt.balanceOf(CERTIK); + }); + + testVip("VIP-390", await vip390(), { + callbackAfterExecution: async txResponse => { + await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [5]); + }, + }); + + describe("Post-VIP behavior", async () => { + it("check balances", async () => { + const usdtBalanceOfCertik = await usdt.balanceOf(CERTIK); + const usdtBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VINTAGE); + const usdcBalanceOfChaosLabs = await usdc.balanceOf(CHAOS_LABS); + const usdtBalanceOfCommunity = await usdt.balanceOf(COMMUNITY); + + expect(usdtBalanceOfCertik.sub(prevUSDTBalanceOfCertik)).to.equal(CERTIK_AMOUNT_USDT); + expect(usdtBalanceOfVanguard.sub(prevUSDTBalanceOfVanguard)).to.equal(VANGUARD_VINTAGE_AMOUNT_USDT); + expect(usdcBalanceOfChaosLabs.sub(prevUSDCBalanceOfChaosLabs)).to.equal(CHAOS_LABS_AMOUNT_USDC); + expect(usdtBalanceOfCommunity.sub(prevUSDTBalanceOfCommunity)).to.equal( + BigNumber.from(COMMUNITY_BELNCRYPTO_AMOUNT_USDT).add(COMMUNITY_SOURCECONTROL_AMOUNT_USDT), + ); + }); + }); +}); diff --git a/vips/vip-390/bscmainnet.ts b/vips/vip-390/bscmainnet.ts new file mode 100644 index 000000000..65b9007f7 --- /dev/null +++ b/vips/vip-390/bscmainnet.ts @@ -0,0 +1,78 @@ +import { parseUnits } from "ethers/lib/utils"; +import { ProposalType } from "src/types"; +import { makeProposal } from "src/utils"; + +export const VTREASURY = "0xf322942f644a996a617bd29c16bd7d231d9f35e9"; +export const USDT = "0x55d398326f99059fF775485246999027B3197955"; +export const USDC = "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"; + +export const VANGUARD_VINTAGE = "0xDeA0b46950dDc377E71800deba8F52456A7E42EE"; +export const COMMUNITY = "0xc444949e0054A23c44Fc45789738bdF64aed2391"; +export const CHAOS_LABS = "0xb98D807cDD58a35d2Fca300bEBC06ac39A7CE038"; +export const CERTIK = "0x4cf605b238e9c3c72d0faed64d12426e4a54ee12"; + +export const VANGUARD_VINTAGE_AMOUNT_USDT = parseUnits("17895", 18); +export const COMMUNITY_BELNCRYPTO_AMOUNT_USDT = parseUnits("93800", 18); +export const CHAOS_LABS_AMOUNT_USDC = parseUnits("160000", 18); +export const COMMUNITY_SOURCECONTROL_AMOUNT_USDT = parseUnits("24000", 18); +export const CERTIK_AMOUNT_USDT = parseUnits("35000", 18); + +export const vip390 = () => { + const meta = { + version: "v2", + title: "VIP-390", + description: `#### Summary + +If passed this VIP will perform the following actions: + +- Refund 17,895 USDT to Vanguard Vantage of various Venus marketing +- Transfer 93,800 USDT to Community wallet for PR Agency BeInCrypto +- Transfer 160,000 USDC to Chaos labs for the Quarterly payment +- Transfer 24,000 USDT to Community wallet for SourceControl Web3 +- Transfer 35,000 USDT to Certik + +#### Details + +#### References + +- [VIP simulation](https://github.com/VenusProtocol/vips/pull/359) +`, + 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: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, VANGUARD_VINTAGE_AMOUNT_USDT, VANGUARD_VINTAGE], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, COMMUNITY_BELNCRYPTO_AMOUNT_USDT, COMMUNITY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDC, CHAOS_LABS_AMOUNT_USDC, CHAOS_LABS], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, COMMUNITY_SOURCECONTROL_AMOUNT_USDT, COMMUNITY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, CERTIK_AMOUNT_USDT, CERTIK], + }, + ], + meta, + ProposalType.REGULAR, + ); +}; + +export default vip390; From cb902b67ebd911e847435d13bc89d45afe1474ac Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Wed, 23 Oct 2024 12:12:59 +0530 Subject: [PATCH 2/7] refactor: redeem vusdc for vtreasury. --- simulations/vip-390/bscmainnet.ts | 4 ++-- vips/vip-390/bscmainnet.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/simulations/vip-390/bscmainnet.ts b/simulations/vip-390/bscmainnet.ts index 2a5b37a19..ee5e7c8eb 100644 --- a/simulations/vip-390/bscmainnet.ts +++ b/simulations/vip-390/bscmainnet.ts @@ -20,7 +20,7 @@ import vip390, { import ERC20_ABI from "./abi/ERC20.json"; import VTREASURY_ABI from "./abi/VTreasury.json"; -forking(43336691, async () => { +forking(43341367, async () => { let usdc: Contract; let usdt: Contract; @@ -41,7 +41,7 @@ forking(43336691, async () => { testVip("VIP-390", await vip390(), { callbackAfterExecution: async txResponse => { - await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [5]); + await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [6]); }, }); diff --git a/vips/vip-390/bscmainnet.ts b/vips/vip-390/bscmainnet.ts index 65b9007f7..c3ca49884 100644 --- a/vips/vip-390/bscmainnet.ts +++ b/vips/vip-390/bscmainnet.ts @@ -2,15 +2,18 @@ import { parseUnits } from "ethers/lib/utils"; import { ProposalType } from "src/types"; import { makeProposal } from "src/utils"; +export const TOKEN_REDEEMER = "0xC53ffda840B51068C64b2E052a5715043f634bcd"; export const VTREASURY = "0xf322942f644a996a617bd29c16bd7d231d9f35e9"; export const USDT = "0x55d398326f99059fF775485246999027B3197955"; export const USDC = "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"; +export const vUSDC = "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8"; export const VANGUARD_VINTAGE = "0xDeA0b46950dDc377E71800deba8F52456A7E42EE"; export const COMMUNITY = "0xc444949e0054A23c44Fc45789738bdF64aed2391"; export const CHAOS_LABS = "0xb98D807cDD58a35d2Fca300bEBC06ac39A7CE038"; export const CERTIK = "0x4cf605b238e9c3c72d0faed64d12426e4a54ee12"; +const VUSDC_AMOUNT = parseUnits("6512000", 8); // assuming 1 USDC=40.65040650 ~ 40.7 vUSDC export const VANGUARD_VINTAGE_AMOUNT_USDT = parseUnits("17895", 18); export const COMMUNITY_BELNCRYPTO_AMOUNT_USDT = parseUnits("93800", 18); export const CHAOS_LABS_AMOUNT_USDC = parseUnits("160000", 18); @@ -54,6 +57,16 @@ If passed this VIP will perform the following actions: signature: "withdrawTreasuryBEP20(address,uint256,address)", params: [USDT, COMMUNITY_BELNCRYPTO_AMOUNT_USDT, COMMUNITY], }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [vUSDC, VUSDC_AMOUNT, TOKEN_REDEEMER], + }, + { + target: TOKEN_REDEEMER, + signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", + params: [vUSDC, VTREASURY, CHAOS_LABS_AMOUNT_USDC, VTREASURY], + }, { target: VTREASURY, signature: "withdrawTreasuryBEP20(address,uint256,address)", From 1261a12b79cf8019099035f54bced1ed2d5ee549 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Wed, 23 Oct 2024 19:14:32 +0530 Subject: [PATCH 3/7] fixup: pr comments --- simulations/vip-390/bscmainnet.ts | 6 +++--- vips/vip-390/bscmainnet.ts | 11 +++-------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/simulations/vip-390/bscmainnet.ts b/simulations/vip-390/bscmainnet.ts index ee5e7c8eb..3b4b4f10b 100644 --- a/simulations/vip-390/bscmainnet.ts +++ b/simulations/vip-390/bscmainnet.ts @@ -10,7 +10,7 @@ import vip390, { CHAOS_LABS, CHAOS_LABS_AMOUNT_USDC, COMMUNITY, - COMMUNITY_BELNCRYPTO_AMOUNT_USDT, + COMMUNITY_BEINCRYPTO_AMOUNT_USDT, COMMUNITY_SOURCECONTROL_AMOUNT_USDT, USDC, USDT, @@ -41,7 +41,7 @@ forking(43341367, async () => { testVip("VIP-390", await vip390(), { callbackAfterExecution: async txResponse => { - await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [6]); + await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [5]); }, }); @@ -56,7 +56,7 @@ forking(43341367, async () => { expect(usdtBalanceOfVanguard.sub(prevUSDTBalanceOfVanguard)).to.equal(VANGUARD_VINTAGE_AMOUNT_USDT); expect(usdcBalanceOfChaosLabs.sub(prevUSDCBalanceOfChaosLabs)).to.equal(CHAOS_LABS_AMOUNT_USDC); expect(usdtBalanceOfCommunity.sub(prevUSDTBalanceOfCommunity)).to.equal( - BigNumber.from(COMMUNITY_BELNCRYPTO_AMOUNT_USDT).add(COMMUNITY_SOURCECONTROL_AMOUNT_USDT), + BigNumber.from(COMMUNITY_BEINCRYPTO_AMOUNT_USDT).add(COMMUNITY_SOURCECONTROL_AMOUNT_USDT), ); }); }); diff --git a/vips/vip-390/bscmainnet.ts b/vips/vip-390/bscmainnet.ts index c3ca49884..2090d7324 100644 --- a/vips/vip-390/bscmainnet.ts +++ b/vips/vip-390/bscmainnet.ts @@ -15,7 +15,7 @@ export const CERTIK = "0x4cf605b238e9c3c72d0faed64d12426e4a54ee12"; const VUSDC_AMOUNT = parseUnits("6512000", 8); // assuming 1 USDC=40.65040650 ~ 40.7 vUSDC export const VANGUARD_VINTAGE_AMOUNT_USDT = parseUnits("17895", 18); -export const COMMUNITY_BELNCRYPTO_AMOUNT_USDT = parseUnits("93800", 18); +export const COMMUNITY_BEINCRYPTO_AMOUNT_USDT = parseUnits("93800", 18); export const CHAOS_LABS_AMOUNT_USDC = parseUnits("160000", 18); export const COMMUNITY_SOURCECONTROL_AMOUNT_USDT = parseUnits("24000", 18); export const CERTIK_AMOUNT_USDT = parseUnits("35000", 18); @@ -55,7 +55,7 @@ If passed this VIP will perform the following actions: { target: VTREASURY, signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [USDT, COMMUNITY_BELNCRYPTO_AMOUNT_USDT, COMMUNITY], + params: [USDT, COMMUNITY_BEINCRYPTO_AMOUNT_USDT, COMMUNITY], }, { target: VTREASURY, @@ -65,12 +65,7 @@ If passed this VIP will perform the following actions: { target: TOKEN_REDEEMER, signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", - params: [vUSDC, VTREASURY, CHAOS_LABS_AMOUNT_USDC, VTREASURY], - }, - { - target: VTREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [USDC, CHAOS_LABS_AMOUNT_USDC, CHAOS_LABS], + params: [vUSDC, CHAOS_LABS, CHAOS_LABS_AMOUNT_USDC, VTREASURY], }, { target: VTREASURY, From 380192655fb412e380f8a7403600a0ae64d56372 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Thu, 24 Oct 2024 12:16:55 +0530 Subject: [PATCH 4/7] test: add tests for the token redeemer --- simulations/vip-390/bscmainnet.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/simulations/vip-390/bscmainnet.ts b/simulations/vip-390/bscmainnet.ts index 3b4b4f10b..d86780b9d 100644 --- a/simulations/vip-390/bscmainnet.ts +++ b/simulations/vip-390/bscmainnet.ts @@ -12,17 +12,20 @@ import vip390, { COMMUNITY, COMMUNITY_BEINCRYPTO_AMOUNT_USDT, COMMUNITY_SOURCECONTROL_AMOUNT_USDT, + TOKEN_REDEEMER, USDC, USDT, VANGUARD_VINTAGE, VANGUARD_VINTAGE_AMOUNT_USDT, + vUSDC, } from "../../vips/vip-390/bscmainnet"; import ERC20_ABI from "./abi/ERC20.json"; import VTREASURY_ABI from "./abi/VTreasury.json"; -forking(43341367, async () => { +forking(43390658, async () => { let usdc: Contract; let usdt: Contract; + let vusdc: Contract; let prevUSDTBalanceOfVanguard: BigNumber; let prevUSDTBalanceOfCommunity: BigNumber; @@ -32,6 +35,7 @@ forking(43341367, async () => { before(async () => { usdt = new ethers.Contract(USDT, ERC20_ABI, ethers.provider); usdc = new ethers.Contract(USDC, ERC20_ABI, ethers.provider); + vusdc = new ethers.Contract(vUSDC, ERC20_ABI, ethers.provider); prevUSDTBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VINTAGE); prevUSDTBalanceOfCommunity = await usdt.balanceOf(COMMUNITY); @@ -59,5 +63,13 @@ forking(43341367, async () => { BigNumber.from(COMMUNITY_BEINCRYPTO_AMOUNT_USDT).add(COMMUNITY_SOURCECONTROL_AMOUNT_USDT), ); }); + + 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); + }); }); }); From 303db879ea9fc7a92f8f9003edc9f8be7f580cdf Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Fri, 6 Dec 2024 20:37:22 +0100 Subject: [PATCH 5/7] feat: update destination addresses --- .../{vip-390 => vip-500}/abi/ERC20.json | 0 .../{vip-390 => vip-500}/abi/VTreasury.json | 0 .../{vip-390 => vip-500}/bscmainnet.ts | 34 ++--- vips/vip-390/bscmainnet.ts | 86 ------------- vips/vip-500/bscmainnet.ts | 118 ++++++++++++++++++ 5 files changed, 135 insertions(+), 103 deletions(-) rename simulations/{vip-390 => vip-500}/abi/ERC20.json (100%) rename simulations/{vip-390 => vip-500}/abi/VTreasury.json (100%) rename simulations/{vip-390 => vip-500}/bscmainnet.ts (70%) delete mode 100644 vips/vip-390/bscmainnet.ts create mode 100644 vips/vip-500/bscmainnet.ts diff --git a/simulations/vip-390/abi/ERC20.json b/simulations/vip-500/abi/ERC20.json similarity index 100% rename from simulations/vip-390/abi/ERC20.json rename to simulations/vip-500/abi/ERC20.json diff --git a/simulations/vip-390/abi/VTreasury.json b/simulations/vip-500/abi/VTreasury.json similarity index 100% rename from simulations/vip-390/abi/VTreasury.json rename to simulations/vip-500/abi/VTreasury.json diff --git a/simulations/vip-390/bscmainnet.ts b/simulations/vip-500/bscmainnet.ts similarity index 70% rename from simulations/vip-390/bscmainnet.ts rename to simulations/vip-500/bscmainnet.ts index d86780b9d..9449f7818 100644 --- a/simulations/vip-390/bscmainnet.ts +++ b/simulations/vip-500/bscmainnet.ts @@ -4,31 +4,31 @@ import { ethers } from "hardhat"; import { expectEvents } from "../../src/utils"; import { forking, testVip } from "../../src/vip-framework"; -import vip390, { +import vip500, { CERTIK, CERTIK_AMOUNT_USDT, CHAOS_LABS, CHAOS_LABS_AMOUNT_USDC, - COMMUNITY, - COMMUNITY_BEINCRYPTO_AMOUNT_USDT, - COMMUNITY_SOURCECONTROL_AMOUNT_USDT, + VENUS_STARS_TREASURY, + VENUS_STARS_BEINCRYPTO_AMOUNT_USDT, + VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT, TOKEN_REDEEMER, USDC, USDT, - VANGUARD_VINTAGE, - VANGUARD_VINTAGE_AMOUNT_USDT, + VANGUARD_VANTAGE_TREASURY, + VANGUARD_VANTAGE_AMOUNT_USDT, vUSDC, -} from "../../vips/vip-390/bscmainnet"; +} from "../../vips/vip-500/bscmainnet"; import ERC20_ABI from "./abi/ERC20.json"; import VTREASURY_ABI from "./abi/VTreasury.json"; -forking(43390658, async () => { +forking(44644162, async () => { let usdc: Contract; let usdt: Contract; let vusdc: Contract; let prevUSDTBalanceOfVanguard: BigNumber; - let prevUSDTBalanceOfCommunity: BigNumber; + let prevUSDTBalanceOfVenusStars: BigNumber; let prevUSDCBalanceOfChaosLabs: BigNumber; let prevUSDTBalanceOfCertik: BigNumber; @@ -37,13 +37,13 @@ forking(43390658, async () => { usdc = new ethers.Contract(USDC, ERC20_ABI, ethers.provider); vusdc = new ethers.Contract(vUSDC, ERC20_ABI, ethers.provider); - prevUSDTBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VINTAGE); - prevUSDTBalanceOfCommunity = await usdt.balanceOf(COMMUNITY); + prevUSDTBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VANTAGE_TREASURY); + prevUSDTBalanceOfVenusStars = await usdt.balanceOf(VENUS_STARS_TREASURY); prevUSDCBalanceOfChaosLabs = await usdc.balanceOf(CHAOS_LABS); prevUSDTBalanceOfCertik = await usdt.balanceOf(CERTIK); }); - testVip("VIP-390", await vip390(), { + testVip("VIP-500", await vip500(), { callbackAfterExecution: async txResponse => { await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [5]); }, @@ -52,15 +52,15 @@ forking(43390658, async () => { describe("Post-VIP behavior", async () => { it("check balances", async () => { const usdtBalanceOfCertik = await usdt.balanceOf(CERTIK); - const usdtBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VINTAGE); + const usdtBalanceOfVanguard = await usdt.balanceOf(VANGUARD_VANTAGE_TREASURY); const usdcBalanceOfChaosLabs = await usdc.balanceOf(CHAOS_LABS); - const usdtBalanceOfCommunity = await usdt.balanceOf(COMMUNITY); + const usdtBalanceOfVenusStars = await usdt.balanceOf(VENUS_STARS_TREASURY); expect(usdtBalanceOfCertik.sub(prevUSDTBalanceOfCertik)).to.equal(CERTIK_AMOUNT_USDT); - expect(usdtBalanceOfVanguard.sub(prevUSDTBalanceOfVanguard)).to.equal(VANGUARD_VINTAGE_AMOUNT_USDT); + expect(usdtBalanceOfVanguard.sub(prevUSDTBalanceOfVanguard)).to.equal(VANGUARD_VANTAGE_AMOUNT_USDT); expect(usdcBalanceOfChaosLabs.sub(prevUSDCBalanceOfChaosLabs)).to.equal(CHAOS_LABS_AMOUNT_USDC); - expect(usdtBalanceOfCommunity.sub(prevUSDTBalanceOfCommunity)).to.equal( - BigNumber.from(COMMUNITY_BEINCRYPTO_AMOUNT_USDT).add(COMMUNITY_SOURCECONTROL_AMOUNT_USDT), + expect(usdtBalanceOfVenusStars.sub(prevUSDTBalanceOfVenusStars)).to.equal( + BigNumber.from(VENUS_STARS_BEINCRYPTO_AMOUNT_USDT).add(VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT), ); }); diff --git a/vips/vip-390/bscmainnet.ts b/vips/vip-390/bscmainnet.ts deleted file mode 100644 index 2090d7324..000000000 --- a/vips/vip-390/bscmainnet.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { parseUnits } from "ethers/lib/utils"; -import { ProposalType } from "src/types"; -import { makeProposal } from "src/utils"; - -export const TOKEN_REDEEMER = "0xC53ffda840B51068C64b2E052a5715043f634bcd"; -export const VTREASURY = "0xf322942f644a996a617bd29c16bd7d231d9f35e9"; -export const USDT = "0x55d398326f99059fF775485246999027B3197955"; -export const USDC = "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"; -export const vUSDC = "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8"; - -export const VANGUARD_VINTAGE = "0xDeA0b46950dDc377E71800deba8F52456A7E42EE"; -export const COMMUNITY = "0xc444949e0054A23c44Fc45789738bdF64aed2391"; -export const CHAOS_LABS = "0xb98D807cDD58a35d2Fca300bEBC06ac39A7CE038"; -export const CERTIK = "0x4cf605b238e9c3c72d0faed64d12426e4a54ee12"; - -const VUSDC_AMOUNT = parseUnits("6512000", 8); // assuming 1 USDC=40.65040650 ~ 40.7 vUSDC -export const VANGUARD_VINTAGE_AMOUNT_USDT = parseUnits("17895", 18); -export const COMMUNITY_BEINCRYPTO_AMOUNT_USDT = parseUnits("93800", 18); -export const CHAOS_LABS_AMOUNT_USDC = parseUnits("160000", 18); -export const COMMUNITY_SOURCECONTROL_AMOUNT_USDT = parseUnits("24000", 18); -export const CERTIK_AMOUNT_USDT = parseUnits("35000", 18); - -export const vip390 = () => { - const meta = { - version: "v2", - title: "VIP-390", - description: `#### Summary - -If passed this VIP will perform the following actions: - -- Refund 17,895 USDT to Vanguard Vantage of various Venus marketing -- Transfer 93,800 USDT to Community wallet for PR Agency BeInCrypto -- Transfer 160,000 USDC to Chaos labs for the Quarterly payment -- Transfer 24,000 USDT to Community wallet for SourceControl Web3 -- Transfer 35,000 USDT to Certik - -#### Details - -#### References - -- [VIP simulation](https://github.com/VenusProtocol/vips/pull/359) -`, - 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: VTREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [USDT, VANGUARD_VINTAGE_AMOUNT_USDT, VANGUARD_VINTAGE], - }, - { - target: VTREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [USDT, COMMUNITY_BEINCRYPTO_AMOUNT_USDT, COMMUNITY], - }, - { - target: VTREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [vUSDC, VUSDC_AMOUNT, TOKEN_REDEEMER], - }, - { - target: TOKEN_REDEEMER, - signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", - params: [vUSDC, CHAOS_LABS, CHAOS_LABS_AMOUNT_USDC, VTREASURY], - }, - { - target: VTREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [USDT, COMMUNITY_SOURCECONTROL_AMOUNT_USDT, COMMUNITY], - }, - { - target: VTREASURY, - signature: "withdrawTreasuryBEP20(address,uint256,address)", - params: [USDT, CERTIK_AMOUNT_USDT, CERTIK], - }, - ], - meta, - ProposalType.REGULAR, - ); -}; - -export default vip390; diff --git a/vips/vip-500/bscmainnet.ts b/vips/vip-500/bscmainnet.ts new file mode 100644 index 000000000..12a6a7b90 --- /dev/null +++ b/vips/vip-500/bscmainnet.ts @@ -0,0 +1,118 @@ +import { parseUnits } from "ethers/lib/utils"; +import { ProposalType } from "src/types"; +import { makeProposal } from "src/utils"; + +export const TOKEN_REDEEMER = "0xC53ffda840B51068C64b2E052a5715043f634bcd"; +export const VTREASURY = "0xf322942f644a996a617bd29c16bd7d231d9f35e9"; +export const USDT = "0x55d398326f99059fF775485246999027B3197955"; +export const USDC = "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"; +export const vUSDC = "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8"; + +export const VANGUARD_VANTAGE_TREASURY = "0xf645a387180F5F74b968305dF81d54EB328d21ca"; +export const VENUS_STARS_TREASURY = "0xd7ca847Aa074b28A1DfeFfd3B2C3f9780cA96e1D"; +export const CHAOS_LABS = "0xb98D807cDD58a35d2Fca300bEBC06ac39A7CE038"; +export const CERTIK = "0x4cf605b238e9c3c72d0faed64d12426e4a54ee12"; + +const VUSDC_AMOUNT = parseUnits("6512000", 8); // assuming 1 USDC=40.65040650 ~ 40.7 vUSDC +export const VANGUARD_VANTAGE_AMOUNT_USDT = parseUnits("17895", 18); +export const VENUS_STARS_BEINCRYPTO_AMOUNT_USDT = parseUnits("93800", 18); +export const CHAOS_LABS_AMOUNT_USDC = parseUnits("160000", 18); +export const VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT = parseUnits("24000", 18); +export const CERTIK_AMOUNT_USDT = parseUnits("52500", 18); + +export const vip500 = () => { + const meta = { + version: "v2", + title: "VIP-500 Payments to providers and Refunds", + description: `#### Summary + +If passed this VIP will perform the following actions: + +- Transfer 17,895 USDT to Vanguard Vantage Treasury for a refund of various Venus marketing, sponsorships, Venues and Conferences in Q3 2024. +- Transfer 93,800 USDT to the Venus Stars Treasury for a refund and payment of the balance for the annual payment of VenusLabs contracted PR Agency BeInCrypto. +- Transfer 160,000 USDC to ChaosLabs for the Quarterly payment +- Transfer 24,000 USDT to the Vanguard Vantage Treasury for a refund of SourceControl Web3 +- Transfer 52,500 USDT to Certik, for the retainer program (October, November and December 2024) + +#### Details + +**Vanguard Vantage - Refunds of Q3 2024 Venus.io WEB3 Conferences, hosting, co-hosting & sponsorships expenses refund** + +- Crypto Valley Summit Event +- Token2049 Founders and Investor Brunch +- KelpDAO Token2049 Restaking Conclave +- Cost: 17,895 USDT, to be sent to the Vanguard Vantage Treasury ([0xf645a387180F5F74b968305dF81d54EB328d21ca](https://bscscan.com/address/0xf645a387180F5F74b968305dF81d54EB328d21ca)) + +**BeInCrypto - Annual PR Agency** + +- Provider: BeInCrypto (https://beincrypto.com) +- Concept: 12-month Performance Marketing Contract (August 2024 to September 2025) +- Cost: 93,800 USDT, to be sent to the Venus Stars Treasury ([0xd7ca847Aa074b28A1DfeFfd3B2C3f9780cA96e1D](https://bscscan.com/address/0xd7ca847Aa074b28A1DfeFfd3B2C3f9780cA96e1D)), that already paid 50% to BeInCrypto (Payment: [Ethereum Transaction Hash (Txhash) Details | Etherscan](https://etherscan.io/tx/0x7043c7e01f3a79843066da6539f6480106434dbf24b03b9290da5efc65ffeaa1)) + +**Chaos Labs** + +- [https://chaoslabs.xyz](https://chaoslabs.xyz/) +- Risk Management Quarterly Payment: October 1, 2024 - December 31, 2024: $100,000.00 +- Additional Deployments (Arbitrum): October 1, 2024 - December 31, 2024: $30,000.00 +- Additional Deployments (ZKsync): October 1, 2024 - December 31, 2024: $30,000.00 +- Cost: 160,000 USDC, to be sent to the BEP20 address [0xb98D807cDD58a35d2Fca300bEBC06ac39A7CE038](https://bscscan.com/address/0xb98D807cDD58a35d2Fca300bEBC06ac39A7CE038) + +**SourceControl Web3 ltd** + +- Provider: SourceControl ([https://www.source-control.io](https://www.source-control.io/)) +- Concept: WEB3 Staff recruiting campaign +- Cost: 24,000 USDT, to be refunded to the Vanguard Vantage Treasury ([0xf645a387180F5F74b968305dF81d54EB328d21ca](https://bscscan.com/address/0xf645a387180F5F74b968305dF81d54EB328d21ca)) ([Payment TX](https://etherscan.io/tx/0x895d90d04b551cf089c2ca46b1138322781cc7f39dae540e0ea282811bf84c8d)) + +**Certik - retainer program** + +- Auditor: Certik ([https://certik.com](https://certik.com/)) +- Concept: Retainer program - monthly payment of October, November and December 2024. +- Cost: 52,500 USDT, to be sent to the BEP20 address [0x4cf605b238e9c3c72d0faed64d12426e4a54ee12](https://bscscan.com/address/0x4cf605b238e9c3c72d0faed64d12426e4a54ee12) + +#### References + +- [VIP simulation](https://github.com/VenusProtocol/vips/pull/414)`, + 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: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, VANGUARD_VANTAGE_AMOUNT_USDT, VANGUARD_VANTAGE_TREASURY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, VENUS_STARS_BEINCRYPTO_AMOUNT_USDT, VENUS_STARS_TREASURY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [vUSDC, VUSDC_AMOUNT, TOKEN_REDEEMER], + }, + { + target: TOKEN_REDEEMER, + signature: "redeemUnderlyingAndTransfer(address,address,uint256,address)", + params: [vUSDC, CHAOS_LABS, CHAOS_LABS_AMOUNT_USDC, VTREASURY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT, VANGUARD_VANTAGE_TREASURY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, CERTIK_AMOUNT_USDT, CERTIK], + }, + ], + meta, + ProposalType.REGULAR, + ); +}; + +export default vip500; From ba1575f3a792df1320c7a6162d2b199a6392a7e8 Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Fri, 6 Dec 2024 20:46:38 +0100 Subject: [PATCH 6/7] fix: check the right transferred amounts --- simulations/vip-500/bscmainnet.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/simulations/vip-500/bscmainnet.ts b/simulations/vip-500/bscmainnet.ts index 9449f7818..102558e36 100644 --- a/simulations/vip-500/bscmainnet.ts +++ b/simulations/vip-500/bscmainnet.ts @@ -9,14 +9,14 @@ import vip500, { CERTIK_AMOUNT_USDT, CHAOS_LABS, CHAOS_LABS_AMOUNT_USDC, - VENUS_STARS_TREASURY, - VENUS_STARS_BEINCRYPTO_AMOUNT_USDT, - VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT, TOKEN_REDEEMER, USDC, USDT, - VANGUARD_VANTAGE_TREASURY, VANGUARD_VANTAGE_AMOUNT_USDT, + VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT, + VANGUARD_VANTAGE_TREASURY, + VENUS_STARS_BEINCRYPTO_AMOUNT_USDT, + VENUS_STARS_TREASURY, vUSDC, } from "../../vips/vip-500/bscmainnet"; import ERC20_ABI from "./abi/ERC20.json"; @@ -57,11 +57,11 @@ forking(44644162, async () => { const usdtBalanceOfVenusStars = await usdt.balanceOf(VENUS_STARS_TREASURY); expect(usdtBalanceOfCertik.sub(prevUSDTBalanceOfCertik)).to.equal(CERTIK_AMOUNT_USDT); - expect(usdtBalanceOfVanguard.sub(prevUSDTBalanceOfVanguard)).to.equal(VANGUARD_VANTAGE_AMOUNT_USDT); - expect(usdcBalanceOfChaosLabs.sub(prevUSDCBalanceOfChaosLabs)).to.equal(CHAOS_LABS_AMOUNT_USDC); - expect(usdtBalanceOfVenusStars.sub(prevUSDTBalanceOfVenusStars)).to.equal( - BigNumber.from(VENUS_STARS_BEINCRYPTO_AMOUNT_USDT).add(VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT), + expect(usdtBalanceOfVanguard.sub(prevUSDTBalanceOfVanguard)).to.equal( + BigNumber.from(VANGUARD_VANTAGE_AMOUNT_USDT).add(VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT), ); + expect(usdcBalanceOfChaosLabs.sub(prevUSDCBalanceOfChaosLabs)).to.equal(CHAOS_LABS_AMOUNT_USDC); + expect(usdtBalanceOfVenusStars.sub(prevUSDTBalanceOfVenusStars)).to.equal(VENUS_STARS_BEINCRYPTO_AMOUNT_USDT); }); it("Leaves no USDC in the redeemer helper contract", async () => { From 498bd009d8453d8a02cca941b14569dd4e0a3780 Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Mon, 9 Dec 2024 22:53:16 +0100 Subject: [PATCH 7/7] feat: set id for VIP 404 --- simulations/{vip-500 => vip-404}/abi/ERC20.json | 0 simulations/{vip-500 => vip-404}/abi/VTreasury.json | 0 simulations/{vip-500 => vip-404}/bscmainnet.ts | 8 ++++---- vips/{vip-500 => vip-404}/bscmainnet.ts | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename simulations/{vip-500 => vip-404}/abi/ERC20.json (100%) rename simulations/{vip-500 => vip-404}/abi/VTreasury.json (100%) rename simulations/{vip-500 => vip-404}/bscmainnet.ts (95%) rename vips/{vip-500 => vip-404}/bscmainnet.ts (98%) diff --git a/simulations/vip-500/abi/ERC20.json b/simulations/vip-404/abi/ERC20.json similarity index 100% rename from simulations/vip-500/abi/ERC20.json rename to simulations/vip-404/abi/ERC20.json diff --git a/simulations/vip-500/abi/VTreasury.json b/simulations/vip-404/abi/VTreasury.json similarity index 100% rename from simulations/vip-500/abi/VTreasury.json rename to simulations/vip-404/abi/VTreasury.json diff --git a/simulations/vip-500/bscmainnet.ts b/simulations/vip-404/bscmainnet.ts similarity index 95% rename from simulations/vip-500/bscmainnet.ts rename to simulations/vip-404/bscmainnet.ts index 102558e36..0a11b4920 100644 --- a/simulations/vip-500/bscmainnet.ts +++ b/simulations/vip-404/bscmainnet.ts @@ -4,7 +4,7 @@ import { ethers } from "hardhat"; import { expectEvents } from "../../src/utils"; import { forking, testVip } from "../../src/vip-framework"; -import vip500, { +import vip404, { CERTIK, CERTIK_AMOUNT_USDT, CHAOS_LABS, @@ -18,11 +18,11 @@ import vip500, { VENUS_STARS_BEINCRYPTO_AMOUNT_USDT, VENUS_STARS_TREASURY, vUSDC, -} from "../../vips/vip-500/bscmainnet"; +} from "../../vips/vip-404/bscmainnet"; import ERC20_ABI from "./abi/ERC20.json"; import VTREASURY_ABI from "./abi/VTreasury.json"; -forking(44644162, async () => { +forking(44729395, async () => { let usdc: Contract; let usdt: Contract; let vusdc: Contract; @@ -43,7 +43,7 @@ forking(44644162, async () => { prevUSDTBalanceOfCertik = await usdt.balanceOf(CERTIK); }); - testVip("VIP-500", await vip500(), { + testVip("VIP-404", await vip404(), { callbackAfterExecution: async txResponse => { await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [5]); }, diff --git a/vips/vip-500/bscmainnet.ts b/vips/vip-404/bscmainnet.ts similarity index 98% rename from vips/vip-500/bscmainnet.ts rename to vips/vip-404/bscmainnet.ts index 12a6a7b90..19414f4c3 100644 --- a/vips/vip-500/bscmainnet.ts +++ b/vips/vip-404/bscmainnet.ts @@ -20,10 +20,10 @@ export const CHAOS_LABS_AMOUNT_USDC = parseUnits("160000", 18); export const VANGUARD_VANTAGE_SOURCECONTROL_AMOUNT_USDT = parseUnits("24000", 18); export const CERTIK_AMOUNT_USDT = parseUnits("52500", 18); -export const vip500 = () => { +export const vip404 = () => { const meta = { version: "v2", - title: "VIP-500 Payments to providers and Refunds", + title: "VIP-404 Payments to providers and Refunds", description: `#### Summary If passed this VIP will perform the following actions: @@ -115,4 +115,4 @@ If passed this VIP will perform the following actions: ); }; -export default vip500; +export default vip404;