-
Notifications
You must be signed in to change notification settings - Fork 2
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
A deployed vault can be deployed again. #80
Comments
It might be that the vaults are connected to different vaults on different chains, how would you check against that? |
This is more of a social engineering type of issue, everybody can check for themselves the address of the legit vault they want to use. |
Hi @reednaa
If isCreatedByFactory is already set to true on that chain, then it has been deployed and we can revert with an error message e.g, "vault already deployed!" |
Sorry, I don't understand. |
Let's recap
|
My argument is: The vault that is WETH, USDC could be a single pool (not connected to any other vaults) or be in a larger pool, say connected to a vault on Polygon which is WMATIC, USDT. There is no way to know from a single chain. How would you check the difference between these vaults? |
Let's use the vault's name and symbol
Let the name and symbol of each vault be unique to that vault. |
Wouldn't that allow someone to DoS pool creation? |
It seems there are many edge cases around this issue so it would be impossible to suggest just one fix to address all of them. If you have a better fix in mind, let's hear it. |
My "fix" is not fixing. |
I suggest we go with my fix then, as both suggestions of:
Is a good step in the right direction of securing the protocol and users. |
We have decided to classify this issue as won’t fix. Our decision is based on the following arguments:
According to these arguments, the issue is won’t fix. |
Github username: --
Twitter username: --
Submission hash (on-chain): 0x08845b1c7713d61ed63e6b4b5abbcbb128841c5beee32489382a954d6241c4a7
Severity: medium
Description:
Description
A deployed vault can be deployed again. This is due to a lack of validation to verify that the vault about to be deployed hasn't already been deployed before deploying it.
This will lead to duplicate vaults.
Attack Scenario
An adversary can exploit the vulnerability to create bad duplicates of an already exisiting good vault in order to tarnsih the vault's reputation. It can also be done to trick users into interacting with bad vaults.
Proof of Concept (PoC) File
Add this test to DeployVault.t.sol and run forge test --mt test_deploy_twice
Poc file attached below.
Proposed fix
Verify that the vault hasn't been deployed before deploying it.
Files:
The text was updated successfully, but these errors were encountered: