Uniswap / docs

📓 Uniswap V3 docs website
https://docs.uniswap.org
317 stars 526 forks source link

add BalanceDelta reference guide with mdx formatting #763

Closed krisoshea-eth closed 1 month ago

krisoshea-eth commented 1 month ago

This PR adds a reference guide for the BalanceDelta type in Uniswap V4.

Key Features of the Document:

  1. Introduction to BalanceDelta and its role in Uniswap V4
  2. Detailed explanation of the purpose and importance of BalanceDelta in managing pool balances
  3. Type definition and using directives for BalanceDelta
  4. Comprehensive breakdown of core functions:
    • toBalanceDelta
    • add
    • sub
    • eq
    • neq
  5. Explanation of library functions:
    • amount0
    • amount1
  6. Discussion on the usage of BalanceDelta in hooks and the Pool library
  7. Insights into how BalanceDelta contributes to gas optimization in Uniswap V4 operations

Document Structure:

Impact and Importance:

Understanding BalanceDelta is essential for implementing custom hooks, managing pool balances, and optimizing gas usage in Uniswap V4 operations. It provides insights into how Uniswap V4 efficiently handles balance changes across various pool operations.

vercel[bot] commented 1 month ago

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

A member of the Team first needs to authorize it.