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 LiquidityAmounts Reference guide with mdx formatting #759

Merged

Conversation

krisoshea-eth
Copy link
Contributor

This PR adds a reference guide for the LiquidityAmounts library in Uniswap V4.

Key Features of the Document:

  1. Introduction to the LiquidityAmounts library and its purpose in Uniswap V4
  2. Explanation of the key concept sqrtPriceX96 and its importance in price calculations
  3. Detailed breakdown of six core functions in the library:
    • getLiquidityForAmount0
    • getLiquidityForAmount1
    • getLiquidityForAmounts
    • getAmount0ForLiquidity
    • getAmount1ForLiquidity
    • getAmountsForLiquidity
  4. For each function:
    • Solidity function signature
    • Description of functionality
    • Table of input parameters
    • Description of return values

Document Structure:

  • Uses MDX formatting with frontmatter
  • Provides Solidity code snippets for each function
  • Includes tables for function parameters
  • Follows a consistent format for describing each function

Impact and Importance:

The LiquidityAmounts library is fundamental to many core operations in Uniswap, including adding and removing liquidity, and calculating token amounts. Understanding these functions is essential for anyone implementing, integrating, or building on top of Uniswap V4's liquidity management features.

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 6144405 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