1

Our dApp uses Permit for gasless token approvals. We are generating a signature request with signTypedData, and it works except for a few strange occurrences where I am getting back an invalid signature.

I noticed 3 instances in which different wallet addresses generated the same exact invalid Permit signature with a v value of 215.. which is too large and I am expecting only v values of 27 & 28. The sig looks like this:

  • r: 0xc143ea...
  • s: 0xc65cdb...
  • v: 215

How could this different wallets produce the same permit sig? Why is this occurring? Is it due to an unsupported wallet? The logs reveal the three users connected via either MetaMask or injected browser wallet.

1 Answer 1

1

The recovery identifier v as of eip-155 can contain the chainId.

The formula is: {0,1} + CHAIN_ID * 2 + 35, compared to the previous version {0,1} + 27.

So, it looks like, the wallets generate the signature for another chain: chainId 90

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.