The RankedChoiceVoting
contract is designed to allow voters to sign off-chain transactions that can be used to submit their votes on-chain through the rankCandidatesBySig
function. However, the contract lacks a DOMAIN_SEPARATOR
getter. This is problematic because it impedes the ability of users to sign and verify transactions off-chain, which is crucial for the functionality of rankCandidatesBySig
.
The DOMAIN_SEPARATOR
is a crucial component of the EIP-712 standard used for off-chain signing and on-chain verification. The DOMAIN_SEPARATOR
is used in the signature verification process to ensure that the signed data is tied to a specific domain. In the rankCandidatesBySig
function, the DOMAIN_SEPARATOR
is used to hash the data that is signed by the voters. Without a proper DOMAIN_SEPARATOR
getter in the contract, users cannot correctly sign transactions that will be verified by the contract.
Off-Chain Signing: Users are unable to sign transactions that can be later used in rankCandidatesBySig
, rendering the feature non-functional.
Functionality: The inability to retrieve or verify the DOMAIN_SEPARATOR
will break the expected workflow for off-chain signing and on-chain submission of votes.
Security: Without proper DOMAIN_SEPARATOR
handling, there is a risk of mismatched or incorrect signatures being used, potentially leading to incorrect voting or unauthorized access.
Manual Review
Implement DOMAIN_SEPARATOR Getter:
Add a public function to the RankedChoiceVoting
contract that returns the DOMAIN_SEPARATOR
. This function should match the EIP-712 domain separator specification.
Example Implementation:
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.