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

VaultFactory.sol - reorg possibility upon Vault creation #69

Closed
code423n4 opened this issue Jul 11, 2023 · 2 comments
Closed

VaultFactory.sol - reorg possibility upon Vault creation #69

code423n4 opened this issue Jul 11, 2023 · 2 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate-416 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/VaultFactory.sol#L55-L86

Vulnerability details

Description

The VaultFactory is a simple contract allowing users to create their own Vaults, by passing the needed parameters. These new Vaults use create and since the protocol will be run on multiple chains, it is susceptible to reorgs.

Impact

Vaults not being deployed correctly, malicious actors overtaking ownership of new Vaults.

Proof of Concept

https://polygonscan.com/blocks_forked
Example of the great amounts of reorgs occuring on Polygon
Fraud blocks on Optimism can also lead to reorgs.

Tools Used

Manual Review

Recommended Mitigation Steps

Use the create2 to create vaults and provide all of the constructor data + salt + msg.sender

Assessed type

Timing

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Jul 11, 2023
code423n4 added a commit that referenced this issue Jul 11, 2023
@c4-judge
Copy link
Contributor

Picodes marked the issue as duplicate of #416

@c4-judge
Copy link
Contributor

c4-judge commented Aug 6, 2023

Picodes marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate-416 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants