Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low
Valid

Possible DoS can be done after setting the contest and transferring the funds to the proxy address

Summary

After the owner of the ProxyFactory calls setContest function, a salt is calculated that is intended to be used in the _deployProxy function using the create2 opcode. After that it is said in the workflow of the project that the sponsor gets the expected address of the proxy and deposits erc20 tokens. If someone deploys a contract of Proxy type contract(before the real/expected proxy is deployed) to that address using the same salt, a DoS problem arises because now every attempt to deploy the proxy would revert as there is already a contract deployed to the same address.

Vulnerability Details

This DoS attack can be performed really easy and can lead to loss of funds because the sponsor would send the money to the address thinking the proxy will be deployed later but an attacker can see the arguments used in the setPool function(available in the mempool) to calculate the salt, he now deploys some contract using the create2 opcode and the erc20 tokens are stuck forever because there is no way to deploy the proxy as it always reverts when _deployProxy internal function is called because there is already a contract at the address that create2 is trying to deploy to.

Impact

This leads to loss of funds.

Tools Used

Manual Review

Recommendations

I would suggest deploying the proxy in the setContest function to avoid such attack

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.