Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit: H-02 Votes Can Be Blocked #555

Closed
Orland0x opened this issue Oct 4, 2023 · 0 comments · Fixed by #593
Closed

audit: H-02 Votes Can Be Blocked #555

Orland0x opened this issue Oct 4, 2023 · 0 comments · Fixed by #593
Assignees

Comments

@Orland0x
Copy link
Contributor

Orland0x commented Oct 4, 2023

The StarknetCommit contract allows anyone to submit a hash representing their vote,
which will be recorded with their L1 address in the EthTxAuthenticator contract. Later,
they can consume the commitment, provided the hash matches a valid transaction (i.e.,
proposal, vote, or proposal update) from the original sender.
However, an attacker can submit a hash corresponding to another user's valid transaction. This
will prevent the victim from making the same commitment to execute the transaction.
Fortunately, since metadata_uri is a free parameter, they could commit to an equivalent
transaction with a different metadata_uri value, and use a private relayer to ensure they
cannot be front-run.
Consider including the L1 message sender as part of the hash commitment to ensure
uniqueness. Alternatively, consider using a two-dimensional storage mapping to allow multiple
users to commit to the same hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants