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.
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.
This leads to loss of funds.
Manual Review
I would suggest deploying the proxy in the setContest
function to avoid such attack
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.