Skip to content
Request an audit

‹ All findings

Domain separator calculation is not fork safe

MediumOrange Bridge·Three Sigma · Cross-chain bridge · 15th July, 20243S-OB-L07

Description

The domain separator is cached in the constructor of the contracts, which could lead to signature signing softwares in case of a hard fork.

When a hard fork happens, block.chainid changes, which affects the domain separator, but as it is only computed in the constructor, it will be forever incorrect. Messages can still be signed but EIP712 will be broken.

Recommendation

The EIP712 contract from OpenZeppelin handles this by caching the original domain separator and recomputing it if block.chainid has changed.

Status

Addressed in #143cee8.