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

FIP-55: PCV Guardian #353

Merged
merged 8 commits into from
Dec 7, 2021
Merged

FIP-55: PCV Guardian #353

merged 8 commits into from
Dec 7, 2021

Conversation

Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Dec 5, 2021

@Joeysantoro Joeysantoro changed the base branch from develop to feat/v2/base December 5, 2021 01:30
@Joeysantoro Joeysantoro changed the title FIP-55 FIP-55: PCV Guardian Dec 5, 2021
Copy link
Contributor

@kryptoklob kryptoklob left a comment

Choose a reason for hiding this comment

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

Needs an integration test or two, otherwise good.

SetupUpgradeFunc,
TeardownUpgradeFunc,
ValidateUpgradeFunc
} from '../../types/types';
Copy link
Contributor

Choose a reason for hiding this comment

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

use shorthand

@kryptoklob
Copy link
Contributor

@Joeysantoro I think we should add in a check when withdrawing to a safe address other than the DAOTimelock that the source and destination underlying token is the same. Otherwise, we could accidentally burn tokens by transferring them into a pcv deposit that can't handle them.

@kryptoklob
Copy link
Contributor

Also there's an e2e test on this that is failing that I'd like to see fixed before approving.

@eswak
Copy link
Contributor

eswak commented Dec 6, 2021

@Joeysantoro I think we should add in a check when withdrawing to a safe address other than the DAOTimelock that the source and destination underlying token is the same. Otherwise, we could accidentally burn tokens by transferring them into a pcv deposit that can't handle them.

We shouldn't be able to burn tokens this way, because deposits have a withdrawERC20 function

@Joeysantoro
Copy link
Contributor Author

@Joeysantoro I think we should add in a check when withdrawing to a safe address other than the DAOTimelock that the source and destination underlying token is the same. Otherwise, we could accidentally burn tokens by transferring them into a pcv deposit that can't handle them.

Interesting. I think we need to sync on this because at a glance its a good idea but it removes the flexibility to rely on withdrawERC20. I think we should put this check inside the depositAfter logic

};

export const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts) => {
const pcvGuardian: PCVGuardian = contracts.pcvGuardian as PCVGuardian;
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need to cast to type of PCVGuardian as the artifact that is loaded from contracts should be correct.

);

expect(await contracts.rariPool8FeiPCVDeposit.paused()).to.be.true;
expect(await contracts.fei.balanceOf(contractAddresses.feiDAOTimelock)).to.be.bignumber.equal(
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add test to see delta between starting and ending balance.

@Joeysantoro Joeysantoro merged commit 081dc43 into feat/v2/base Dec 7, 2021
@Joeysantoro Joeysantoro deleted the feat/v2/fip-55 branch December 7, 2021 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants