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

M-08 MitigationConfirmed #82

Open
code423n4 opened this issue Aug 25, 2023 · 1 comment
Open

M-08 MitigationConfirmed #82

code423n4 opened this issue Aug 25, 2023 · 1 comment
Labels
mitigation-confirmed MR-M-08 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

Vulnerability details

Original Issue

M-08 - Attacker can front-run deployVault to deploy at the same address

Details

The previous implementation of the VaultFactory used the new keyword, which uses the CREATE1 opcode to create new Vaults, this opens up the doors for a reorg attack, where an attacker can front-run deployVault to deploy at the same address but with different config.

Mitigation

As part of the mitigation, now, the VaultFactory uses the Create2 contract from OpenZeppelin, which under the hood uses the create2 opcode to deploy the Vault using the bytecode of the Vault contract & a salt.

Conclusion

The implemented mitigation solves the original issue.

code423n4 added a commit that referenced this issue Aug 25, 2023
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Sep 5, 2023
@c4-judge
Copy link

c4-judge commented Sep 5, 2023

Picodes marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-M-08 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants