Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIP-120] DAO Vote: PCVGuardian v3 #952

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update pcv_guardian_v3 to be executed by DAO
eswak committed Jul 13, 2022
commit a8ee388afaf1508839757057665900368215723b
16 changes: 16 additions & 0 deletions proposals/dao/pcv_guardian_v3.ts
Original file line number Diff line number Diff line change
@@ -109,6 +109,22 @@ const teardown: TeardownUpgradeFunc = async (addresses, oldContracts, contracts,
// Run any validations required on the fip using mocha or console logging
// IE check balances, check state of contracts, etc.
const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts, logging) => {
// validate that the guardian can use the new PCVGuardian to perform a
// ratio PCV movement to a safe address
const guardianSigner = await getImpersonatedSigner(addresses.guardianMultisig);
const balanceBefore = await contracts.dai.balanceOf(addresses.daiHoldingPCVDeposit);
await contracts.pcvGuardian.connect(guardianSigner).withdrawERC20RatioToSafeAddress(
addresses.daiFixedPricePSM,
addresses.daiHoldingPCVDeposit,
addresses.dai,
'5000', // 50%
true // depositAfter
);
const balanceAfter = await contracts.dai.balanceOf(addresses.daiHoldingPCVDeposit);
expect(balanceBefore).to.be.equal('0');
// round to unit because there can be 1 wei of error
expect(balanceAfter / 1e18).to.be.equal((await contracts.daiFixedPricePSM.balance()) / 1e18);

// display pcvStats
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being paranoid I would probably make sure that we can move funds here using the newly deployed pcvGuardianV3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

console.log('----------------------------------------------------');
console.log(' pcvStatsBefore.protocolControlledValue [M]e18 ', Number(pcvStatsBefore.protocolControlledValue) / 1e24);
10 changes: 9 additions & 1 deletion proposals/description/pcv_guardian_v3.ts
Original file line number Diff line number Diff line change
@@ -49,7 +49,15 @@ const proposal: TemplatedProposalDescription = {
],
description: `TIP-120: PCV Guardian v3

PCV Guardian v3 adds features that allow moving a percentage of the funds held by the PCV Deposits. This is useful for the Tribal Council when executing proposals if the amounts of tokens are not known in advance. This capability was existing for the DAO Timelock, but not for the Tribal Council. This proposal does not allow movements of funds to new addresses and does not increase the responsibilities of any role. This proposal also upgrades the Fuse Withdrawal Guard to use the new PCV Guardian v3 to keep this feature active.
PCV Guardian v3 adds features that allow moving a percentage of the funds held by the PCV Deposits.

This is useful for the Tribal Council when executing proposals if the amounts of tokens are not known in advance.

This capability was existing for the DAO Timelock, but not for the Tribal Council.

This proposal does not allow movements of funds to new addresses and does not increase the responsibilities of any role.

This proposal also upgrades the Fuse Withdrawal Guard to use the new PCV Guardian v3.
`
};

2 changes: 1 addition & 1 deletion protocol-configuration/proposalsConfig.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ export const ProposalsConfig: TemplatedProposalsConfigMap = {
proposalId: '',
affectedContractSignoff: [],
deprecatedContractSignoff: [],
category: ProposalCategory.TC
category: ProposalCategory.DAO
},
tip_119: {
deploy: false, // deploy flag for whether to run deploy action during e2e tests or use mainnet state