# Protocol does not implement EIP712 correctly on multiple occasions

reNFT's Signer.sol miscomputes EIP-712 typehashes and struct hashes, breaking signature compatibility with standard libraries and causing rental-order DOS.

- Payout: Contest reward
- Severity: medium
- Program: reNFT
- Credited: BI\_security
- Disclosed: 2024-03-20
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-01-renft-findings/issues/239
- Library page: https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-11
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:dos vuln:signature-replay

**Target:** Solidity Signer.sol EIP-712 hashing (rental order, hook, metadata)
**Root cause:** Dynamic bytes fields (hook.extraData) are abi.encode'd without keccak256, type strings are concatenated with abi.encode instead of encodePacked, and _deriveOrderMetadataHash omits orderType and emittedExtraData declared in the typehash.
**Steps:**
1. Read Signer.sol _deriveHookHash: `abi.encode(_HOOK_TYPEHASH, hook.target, hook.itemIndex, hook.extraData)` — extraData not hashed.
2. Read typehash construction: `keccak256(abi.encode(rentalOrderTypeString, hookTypeString, itemTypeString))` instead of encodePacked.
3. Read _deriveOrderMetadataHash: encodes only rentDuration and hookHashes, omitting orderType and emittedExtraData.
4. Run forge test with PoC asserting `rentalOrderTypeHash != correctTypeHash` and `rentalOrderTypeHashCorrect == correctTypeHash`.
5. Observe Create.sol _isValidOrderMetadata compares computed hash to Seaport zoneHash, so correctly-generated zoneHash fails -> DOS.
**How found:** Code review of Signer.sol against the EIP-712 spec, comparing each hash construction to the canonical typehash and standard library (ethers) output.
**Insight:** When auditing EIP-712 implementations, recompute the typehash independently and diff against the contract's value; check that every field in the type string is actually encoded and that dynamic types are keccak256-hashed before abi.encode.
