sherlock-audit / 2024-02-optimism-2024-judging

6 stars 4 forks source link

petro1912 - The protocol doesn't check at all if account has already claimed, or moved (for attack, and defense). #218

Closed sherlock-admin2 closed 7 months ago

sherlock-admin2 commented 7 months ago

petro1912

medium

The protocol doesn't check at all if account has already claimed, or moved (for attack, and defense).

Summary

move function in FaultDisputeGame contract doesn't check if account is already the claimant of parent claim.

Vulnerability Detail

Malicious actor create multiple defends or attacks for a game. An account can create a defend and attack claim simultaneously for parent claim, so subgames can come from an account in a claim. In addition, an account can have multiple defends for his root claim.

Indeed, creating claim for depend and attack doesn't check if msg.sender is related to claimant of parent claim and opposite claim.

Impact

It impacts fair claim.

Code Snippet

https://github.com/sherlock-audit/2024-02-optimism-2024/blob/main/optimism/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L226-L318

Tool used

Manual Review

Recommendation

To disable call to move function if account has already parent claim or opposite claim for its parent.

Duplicate of #122