🧬
Head First DeFi: TX & Strategies
  • Decoding the DNA of DeFi Transactions & Strategies
    • From Arbitrage, Sandwich to JIT and Oracle Manipulation
    • Be Prepared To Explore the DeFi World
    • Case Study Format
  • MEV Transaction & Strategy 101
    • A $3.2 Million Profit Arbitrage, the Most Lucrative MEV of 2022
    • Understand Back-Run Arbitrages and Their Signals and Join the MEV Game.
    • Wallchain's MEV Arbitrage Redistribution
    • MEV Blocker, the multi-transaction MEV redistribution system that refunds 90% of builder rewards
    • With NFT arbitrage, someone was snipping your Baby Doge.
    • The Hidden Tax That You Should Know About
    • MEV-Share, Flashbots' MEV Redistribution Solution
  • Don't Let Your Trading Become the Recipe of Someone's Sandwich
    • The Notorious Jaredfromsubway.eth's Sandwich Attack
    • Combined with Flash Loan, This Leveraged Sandwich Launched the Attack with Millions of Volumes
    • Sandwich Targeting Liquidity Providers
    • The Flash-Loan-Enabled Sandwich Attack against Ethereum Foundation
  • Under the Hood of the DeFi Lego
    • What's Really Going on When Processing Liquidity in a Uniswap Pool?
      • Pretend You Are One of the Shareholders of a Bank Branch.
      • Let's Match the Bank Branch to a Uniswap Pool.
      • Adding Liquidity.
      • Removing Liquidity.
      • Conclusion
    • Liquidation: A Good Entry Point to Comprehend Internal Accounting Used by Many DeFi Protocols.
    • A Cross-Chain Arbitrage: The Art of Arbitraging BANANA Cross BSC and Polygon Chains
    • Liquidity Rebalancing: Moving Around $9.4 Million for More Fee Revenues.
    • Rebalancing loan positions utilizing AAVE Flash loan
    • How Does the Grok Token Exploiter Exploit the X Token By Baking His Own Cake And Eating it?
  • Unlocking the Power of Advanced DeFi Transactions and Becoming a DeFi Sleuth
    • Just-in-Time, an MEV Type That Benefits Traders in the Same Trading Venue
    • A Bot Devised Arbitrage Strategies Centered on Autonomous Minting and Burning of Synthetic Tokens
    • The Defect in a Lending Protocol's Oracle Module Was Exploited by a Bot to Generate a $110K Profit
    • A $296K-Profit Arbitrage Done by the Lightning Reflex Bot After the Vyper-Curve Exploit
    • Coffeebabe.eth Utilized Curve's CRV/WETH Pool's Price Deviation for a $5.4 Million Profit Arbitrage.
    • An Attacker Baited MEV Arbitrage Bots and Emptied Their Wallets
    • How Enso Solves 73.5ETH in 116 Steps in One Transaction
Powered by GitBook
On this page

Was this helpful?

  1. Under the Hood of the DeFi Lego
  2. What's Really Going on When Processing Liquidity in a Uniswap Pool?

Adding Liquidity.

PreviousLet's Match the Bank Branch to a Uniswap Pool.NextRemoving Liquidity.

Last updated 1 year ago

Was this helpful?

Let's look at shown in EigenTx to understand what's happening.

The full token flow chart is here.

Dive into the details.

Steps 0, 1: You added USDC and WBTC to the pool.

Step 2: The "virtualLiquidity," the virtual contract recording the total shares of the pool, minted a certain amount of "virtualLiquidity," to record your adding USDC & WBTC liquidity operation. Here, EigenTx uses "virtualLiquidity" as a voucher.

Step 3: The double-entry bookkeeping demands that once a record is added, another record must be added to balance the balance sheet. After step 2, another virtual asset as a voucher, "virtualLiquidity-350101", has to be "minted" to record the shares owned by you now, and it is transferred to your "UNI-V3-POS-350101" NFT contract.

Step 4: The actual NFT, UNI-V3-POS-350101, is minted and transferred to you, the liquidity provider, indicating your position/shares in the pool.

All the dashed lines in the chart show the connections between these actual and virtual contracts.

In comparison with adding liquidity, removing liquidity is more complex.

this add liquidity transaction