Cheerful Taffy Dolphin - Restrictive Domain Validation in Verifier Contract Breaks Zero-Domain Message Processing and Market Integrations #38
Labels
Sponsor Disputed
The sponsor disputed this issue's validity
Cheerful Taffy Dolphin
Medium
Restrictive Domain Validation in Verifier Contract Breaks Zero-Domain Message Processing and Market Integrations
Summary
The
Verifier
contract implements critical signature verification functionality for the Perennial protocol but relies on aVerifierBase
implementation that does not match its documented behavior for domain validation.The contract's documentation explicitly states:
https://github.com/sherlock-audit/2025-01-perennial-v2-4-update/blob/main/perennial-v2/packages/core/contracts/Verifier.sol#L58
However, through inheritance of VerifierBase's
validateAndCancel
modifier, all verification functions (verifyIntent
,verifyOperatorUpdate
,verifySignerUpdate
,verifyAccessUpdateBatch
) enforce a stricter domain validation that requires msg.sender to match the domain in all cases.Impact
The restrictive domain validation in the
Verifier
contract has critical implications for the protocol's operation, particularly in the verification of intents and signature processing:Intent Processing Disruption:
When markets attempt to verify intents via
verifyIntent()
, the current implementation forces a strict domain match even for legitimate zero-domain cases. This directly impacts order fills since every intent verification must route through a specific market address as msg.sender, preventing any flexible intent verification patterns.Market Integration Limitations:
Since
verifyIntent()
is a key entry point for order processing, markets must be the msg.sender for any intent verification. Consider a case where multiple markets need to verify the same intent - the current domain validation makes this impossible since the intent can only be verified by the specific market set in the domain field.Excessive Domain Enforcement:
Operations like
verifyOperatorUpdate()
andverifySignerUpdate()
which manage protocol permissions are unnecessarily restricted. These administrative functions should reasonably support zero-domain verification, especially for direct account management. However, the current validation forces even these basic account operations to route through a domain address.These restrictions conflict with the protocol's own documentation which specifies domain validation should only occur "if it is set," suggesting the current behavior is unintentional and could be blocking legitimate protocol interactions.
Recommended mitigation steps
Update the
Verifier
contract to override or implement its own domain validation:The text was updated successfully, but these errors were encountered: