Closed sherlock-admin4 closed 7 months ago
Invalid issue.
Nonces are per user and not global.
1 comment(s) were left on this issue during the judging contest.
takarez commented:
this seem valid; even if user refuses to call it at all, others will also be affected; medium(6)
Agree with sponsors comment here
levi_104
high
Using ordered nonces may lead to short-term DoS.
Summary
Using ordered nonces may lead to short-term DoS.
Vulnerability Detail
When checking whether the nonce of the signature is valid (to prevent signature replay), a sequential approach was used.
Using ordered nonces may lead to short-term DoS. There is an easy example: user1 gets the signature with nonce 1, but he doesn't call the
delegateBySig()
. In this time, user2 gets the signature with nonce 2. User2 calldelegateBySig()
but tx revert because his nonce is not thecurrentNonce_
. User2 can only calldelegateBySig()
after user1.Impact
Users can only call
delegateBySig()
in order, and once a user delays the call, subsequent users are also affected.Code Snippet
Tool used
Manual Review
Recommendation
Using unordered nonce.
Duplicate of #12