Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request proposes adding a new interface, IHookMetadata, to the Uniswap V4 Periphery repository. The IHookMetadata interface is designed to provide standardized metadata for hooks, which include information about the audit details and additional metadata. By integrating IHookMetadata, we can create a consistent and transparent way to describe hooks, enhancing both the security and the user experience for developers interacting with Uniswap hooks.
The IHookMetadata interface introduces the following key features:
Audit Metadata: Provides comprehensive information regarding audits conducted on the smart contract.
AuditSummary struct: Contains details such as the auditor's name, the issued timestamp, hashes of the code and audit document, and an audit URI.
Auditor struct: Specifies the audit firm's name, additional URI information, and a list of authors involved in the audit.
EIP-712 Domain Information
The EIP712Domain struct is included to describe the domain for which signatures are generated. This is critical for verifying off-chain signed messages, ensuring consistency and integrity across the Uniswap ecosystem.
Signature Standards:
The SignatureType enum defines multiple signature standards supported, including SECP256K1, BLS, ERC1271, and SECP256R1, which allows the flexibility to adopt different signature approaches as needed by various protocols.
Functions for Metadata Retrieval:
The interface provides several functions for easy retrieval of metadata, such as: name, repository, logoURI, and description: Functions that provide basic descriptive information about the hook.
auditSummary, eip712Domain, and signedAuditSummary: Functions that provide crucial audit and signing information.
By adding IHookMetadata, this interface aims to improve trust in the Uniswap ecosystem through more accessible audit data and standardized metadata for hooks. It would ensure a consistent method of obtaining and verifying metadata and signature information for any hooks that integrate with Uniswap V4.
Motivation
Transparency and Trust: Increasing transparency about hook audits and other metadata contributes to improved trust in the Uniswap ecosystem.
Standardization: A standardized interface for audit information reduces friction for developers seeking to integrate their hooks.
Implementation Notes
This interface is defined to be implemented by any hook used within Uniswap, providing a framework for uniform metadata collection.
Adopting IHookMetadata across hooks will help developers better understand, verify, and use hooks while ensuring they meet established standards.
Conclusion
This PR aims to improve the metadata handling, transparency, and security of hooks in Uniswap V4 by integrating IHookMetadata. We believe this will benefit developers, users, and auditors by providing a clear, accessible, and standardized set of metadata for hooks.
Please let me know if there are any questions or further improvements needed for this interface.