Sparkn

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

The signature does not have an expiration time

Summary

The signature does not use a expiration time, allowing to the caller who has the signature to call deployProxyAndDistributeBySignature() at any time.

Vulnerability Details

The deployProxyAndDistributeBySignature() function helps to distribute prizes to winners by the caller who has the correct signature.

The problem is that the signature does not have an expiration time causing that the caller, who has the signature, is able to call the deployProxyAndDistributeBySignature() at any time. That could be a problem because if for some reason no one call the _distribute() function and the owner distributes the prizes using the deployProxyAndDistributeByOwner() function after the expiration time, the signature owner can frontrun the owner deployProxyAndDistributeByOwner() execution. Please see the next scenario:

  1. The organizer creates a signature to the winner1 and winner2.

  2. No one calls deployProxyAndDistribute() or deployProxyAndDistributeBySignature() functions.

  3. The time goes and the owner can call the deployProxyAndDistributeByOwner() function because the expiration time is left behind. The owner wants to distribute prizes to winner1, winner2 and winner3. He adds the winner3.

  4. The caller who has the signature execute the function before the owner execution (frontrun). Now the distribution is made by the caller who owns the signature and it distributes to winner1 and winner2.

Impact

The signature does not have an expiration time. The signature can be used for the end of life.

Tools used

Manual review

Recommendations

Add expiration time to the signature.

Support

FAQs

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