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

Add volatility based dynamic fee hook guide with mdx formatting #755

Merged

Conversation

krisoshea-eth
Copy link
Contributor

This PR introduces a comprehensive guide on implementing a Volatility-Based Dynamic Fee Hook in Uniswap V4. This document is written in MDX format, aligning with our documentation standards.

Key Features of the Document:

  1. Complete implementation of a volatility-based dynamic fee hook for Uniswap v4
  2. Detailed breakdown of the contract structure and key components
  3. Explanation of the volatility-based fee structure and thresholds
  4. Implementation of the Realized Volatility Oracle interface
  5. Detailed explanation of core functions:
    • getFee: Calculates fees based on current volatility
    • beforeSwap: Updates fees before each swap
    • afterInitialize: Sets initial fees for dynamic fee pools
  6. Code snippets for each major component of the implementation

Document Structure:

  • Uses MDX formatting with frontmatter
  • Provides detailed explanations alongside code snippets
  • Follows a logical flow from contract structure to individual function implementations

Impact and Importance:

This document offers a concrete example of how to leverage hooks for creating sophisticated, market-responsive fee mechanisms.

Copy link

vercel bot commented Sep 16, 2024

@krisoshea-eth is attempting to deploy a commit to the Uniswap Team on Vercel.

A member of the Team first needs to authorize it.

@saucepoint saucepoint merged commit f6654f4 into Uniswap:dev-v4 Sep 17, 2024
2 of 3 checks passed
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