The _setDomainSeperator
function in the code does not follow the EIP-712
standard field order when constructing the domainSeparator
. This ordering mismatch will result in an invalid domainSeparator
and cause signature verification failures.
In the _setDomainSeperator function, domainSeparator
is calculated as follows:
In this code, verifyingContract
comes before chainId
, which creates an ordering mismatch that results in a wrong domainSeparator
.
This is incorrect and violates EIP-712
. The correct order as per EIP-712
should be:
name (hashed)
version (hashed)
chainId (uint256)
verifyingContract (address)
According to EIP-712, the fields must appear in a specific order, with chainId
preceding verifyingContract
in the encoded structure.
The EIP712Domain fields should be the order as above, skipping any absent fields. Future field additions must be in alphabetical order and come after the above fields. User-agents should accept fields in any order as specified by the EIP712Domain type.
The domain separator does not match the EIP-712
field ordering requirements. By placing verifyingContract
before chainId
, the generated domain separator will be invalid for EIP-712
signature verification.
Manual Review
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.