DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: medium
Valid

Tractor uses incorrect Blueprint EIP712 typehash

Summary

There is deviation between Blueprint struct and its typehash, check 3rd argument:

bytes32 public constant BLUEPRINT_TYPE_HASH =
keccak256(
"Blueprint(address publisher,bytes data,bytes operatorData,uint256 maxNonce,uint256 startTime,uint256 endTime)"
);
struct Blueprint {
address publisher;
bytes data;
@> bytes32[] operatorPasteInstrs;
uint256 maxNonce;
uint256 startTime;
uint256 endTime;
}

As a result hashStruct calculation deviates from defined by EIP712, and users can't decode what object they sign on frontend

Impact

Tractor implementation deviates from EIP712

Tools Used

Manual Review

Recommendations

Update typehash to:

bytes32 public constant BLUEPRINT_TYPE_HASH =
keccak256(
- "Blueprint(address publisher,bytes data,bytes operatorData,uint256 maxNonce,uint256 startTime,uint256 endTime)"
+ "Blueprint(address publisher,bytes data,bytes32[] operatorPasteInstrs,uint256 maxNonce,uint256 startTime,uint256 endTime)"
);
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

The declaration and use of `LibTractor::BLUEPRINT_TYPE_HASH` is inconsistent with the field name of the structure `struct Blueprint`

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.