-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Signature validation failing for signatures > 130 length
Which application are you experiencing issues with?
- Web (app.uniswap.org)
π» System / Environment Info
Please provide details about your environment:
- Browser: Brave (irrelevant)
- OS / Platform: iOS (irrelevant)
- Device (irrelevant)
- Wallet used: Ambire, Smart account
- Network: Ethereum, but in general all are affected
π Steps to Reproduce
Limit order. You will need a smart account wallet to reproduce. But you don't need to.
Basically, smart account signatures may not be ECDSA and therefore they might not be 65 bytes in length size.
However, the uniswap signature validation expect an exact 130 length signature and therefore fails. The smart account signature is correct and it will pass validation on the blockchain if the size validation is removed.
This is what's returned:
{
"detail": "\"signature\" with value \"0xf0640cd98579a8c43e1d704e94fe35f6164e139423759ac917b0d0910ebbc4ce0a6a60369498de7621a6ae4c102c85ad5a5aeb910fbdc301a933aecefe9602aa1c00\" fails to match the required pattern: /^0x[0-9,a-z,A-Z]{130}$/",
"errorCode": "VALIDATION_ERROR"
}
The signing message is:
{
"kind": "typedMessage",
"types": {
"PermitWitnessTransferFrom": [
{
"name": "permitted",
"type": "TokenPermissions"
},
{
"name": "spender",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
},
{
"name": "witness",
"type": "ExclusiveDutchOrder"
}
],
"TokenPermissions": [
{
"name": "token",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"ExclusiveDutchOrder": [
{
"name": "info",
"type": "OrderInfo"
},
{
"name": "decayStartTime",
"type": "uint256"
},
{
"name": "decayEndTime",
"type": "uint256"
},
{
"name": "exclusiveFiller",
"type": "address"
},
{
"name": "exclusivityOverrideBps",
"type": "uint256"
},
{
"name": "inputToken",
"type": "address"
},
{
"name": "inputStartAmount",
"type": "uint256"
},
{
"name": "inputEndAmount",
"type": "uint256"
},
{
"name": "outputs",
"type": "DutchOutput[]"
}
],
"OrderInfo": [
{
"name": "reactor",
"type": "address"
},
{
"name": "swapper",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
},
{
"name": "additionalValidationContract",
"type": "address"
},
{
"name": "additionalValidationData",
"type": "bytes"
}
],
"DutchOutput": [
{
"name": "token",
"type": "address"
},
{
"name": "startAmount",
"type": "uint256"
},
{
"name": "endAmount",
"type": "uint256"
},
{
"name": "recipient",
"type": "address"
}
],
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
]
},
"domain": {
"name": "Permit2",
"chainId": "1",
"verifyingContract": "0x000000000022d473030f116ddee9f6b43ac78ba3"
},
"message": {
"permitted": {
"token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "1000000"
},
"spender": "0x6000da47483062a0d734ba3dc7576ce6a0b645c4",
"nonce": "1993349507737061452432783688516964554371214508764223689455774238758175366401",
"deadline": "1772188326",
"witness": {
"info": {
"reactor": "0x6000da47483062a0d734ba3dc7576ce6a0b645c4",
"swapper": "0xtainamaina",
"nonce": "1993349507737061452432783688516964554371214508764223689455774238758175366401",
"deadline": "1772188326",
"additionalValidationContract": "0x0000000000000000000000000000000000000000",
"additionalValidationData": "0x"
},
"decayStartTime": "1771583526",
"decayEndTime": "1771583526",
"exclusiveFiller": "0x0000000000000000000000000000000000000000",
"exclusivityOverrideBps": "0",
"inputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"inputStartAmount": "1000000",
"inputEndAmount": "1000000",
"outputs": [
{
"token": "0x0000000000000000000000000000000000000000",
"startAmount": "1000000000000000000",
"endAmount": "1000000000000000000",
"recipient": "0xtainamaina"
}
]
}
},
"primaryType": "PermitWitnessTransferFrom"
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working