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

fix: restrict flashmint #365

Merged
merged 7 commits into from
Oct 14, 2020
Merged

fix: restrict flashmint #365

merged 7 commits into from
Oct 14, 2020

Conversation

alcueca
Copy link
Contributor

@alcueca alcueca commented Oct 13, 2020

Any random user can call executeOnFlashMint, with potential impact to any users that executed vat.hope towards the proxy.

To avoid that, executeOnFlashMint checks that it is being called by the fyDai contract used in the flash mint, which is also the fyDai series used for the migration.

Fixes #361.

Copy link
Contributor

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

The previous fix was not sufficient, as it'd mean that anyone could create a pool contract with a FYDai method and bypass the restriction. I've tightened the limitations here by requiring that the pool provided must be one of the known pools. I had to do it with a function instead of requiring manually each time to keep the bytecode size down.

Copy link
Contributor Author

@alcueca alcueca left a comment

Choose a reason for hiding this comment

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

Great job!

@gakonst gakonst merged commit 588ba35 into master Oct 14, 2020
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.

makerToYield issues?
3 participants