1/5
### Managing Liquidity with NonfungiblePositionManager The most common way to manage liquidity for a Uniswap V3 pool is to interact with a smart contract called `NonfungiblePositionManager`. There are four functions that we can call on this contract: `mint`, `increase liquidity`, `decrease liquidity`, and `collect`. In this lesson, we'll go over an overview of how the `NonfungiblePositionManager` contract and the `Uniswap V3` pool contract interact when a user calls the `mint` function. Let's say that a user wants to create a new position in a `Uniswap V3` pool. To do this, using the contract `NonfungiblePositionManager`, the user will call the function `mint`, specifying the price range that they want to add liquidity to, and the amount of tokens that they want to add. Next, the `NonfungiblePositionManager` will call the function `mint` on the `Uniswap V3` Pool. The pool contract will calculate the amount of tokens that the user must send and then call a callback called `uniswapV3MintCallback`. Inside the callback, tokens `token0` and `token1` are transferred from the user to the contract `UniswapV3Pool`.
A comprehensive guide to managing Uniswap V3 liquidity using the NonfungiblePositionManager contract. This lesson covers the four functions available on the contract; mint, increase liquidity, decrease liquidity, and collect. We will explore each function's purpose and how they interact with Uniswap V3 pools.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Concentrated liquidity and derive its equations
Uniswap V3 math
How to calculate the spot price of tokens
Single and multi position swapping
Factory contract architecture
How to calculate liquidity requirements
Uniswap V3 fee algorithm
Flash loans
TWAP price oracle
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 15, 2025
DeFi Developer
Uniswap V3Duration: 3min
Duration: 35min
Duration: 25min
Duration: 22min
Duration: 1h 43min
Duration: 11min
Duration: 1h 03min
Duration: 12min
Duration: 51min
Duration: 41min
Duration: 10min
Duration: 7min
Course Overview
About the course
Concentrated liquidity and derive its equations
Uniswap V3 math
How to calculate the spot price of tokens
Single and multi position swapping
Factory contract architecture
How to calculate liquidity requirements
Uniswap V3 fee algorithm
Flash loans
TWAP price oracle
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 15, 2025