If DAI is deposited into the contract, the buyer can use the permit()
function on the DAI contract to withdraw the DAI without the approval of the proxy factory
Tokens like Dai have a permit()
implementation that does not follow EIP2612
.
The permit()
issue could allow Owner to steal funds from the contract.Additionally, the issue could damage the reputation of the SPARKN protocol.
Here is a case scenario that illustrates the vulnerability :
1 The Owner of the contract deposits DAI into the contract.
2 A Client sees that the DAI is in the contract and agrees to do a job for the Owner.
3 The Client completes the job.
4 The Owner calls the permit() function inside the DAI contract to recover the DAI.
5 The Client is left with nothing, and the Protocol loses the fee that was paid by the Client.
Manual Review
The SPARKN protocol should not accept DAI deposits. If the contract must accept DAI deposits, then the contract should be updated to have a permit()
function.
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.