EIP712Base
has two issues with the way the domain separator is generated which can result in issues with integrators:
EIP712_DOMAIN_TYPEHASH
is missing chainId
, but contains salt
. ChainId should also be uint256, not bytes.
Incorrect ordering in _setDomainSeperator
- chainId
should come before verifyingContract
According to EIP 712 (https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator):
string name the user readable name of signing domain, i.e. the name of the DApp or the protocol.
string version the current major version of the signing domain. Signatures from different versions are not compatible.
uint256 chainId the EIP-155 chain id. The user-agent should refuse signing if it does not match the currently active chain.
address verifyingContract the address of the contract that will verify the signature. The user-agent may do contract specific phishing prevention.
bytes32 salt an disambiguating salt for the protocol. This can be used as a domain separator of last resort.
...
The EIP712Domain fields should be the order as above, skipping any absent fields.
Right now, chainId
comes after verifyingContract
, when it should come before.
Also, EIP712_DOMAIN_TYPEHASH
is missing chainId
and instead contains salt
:
Protocol is not compliant with EIP 712, which will result in issues with integrators.
Manual review
Update EIP712_DOMAIN_TYPEHASH
to:
Update _setDomainSeperator
:
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.