Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create IHookMetadata #382

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RostyslavBortman
Copy link

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.

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.

Details

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.

Security: Leveraging the EIP-712 domain and supporting multiple signature types strengthens the ability to verify transactions and audit reports effectively.

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.
@saucepoint
Copy link
Collaborator

@RostyslavBortman can you give it a filename hah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants