Liquidity
Provide and manage liquidity across Eloqura V2 pools.
Source: client/src/pages/liquidity.tsx
Overview
The Liquidity page lets users browse all Eloqura pools, provide liquidity to earn LP tokens, withdraw positions, and create new pools for token pairs that don't exist yet.
Features
Pool Discovery
Pools are enumerated from the Factory contract:
Factory.allPairsLength()→ total pool countFactory.allPairs(index)→ pair address for each indexPer pair: fetch
token0,token1,getReserves(),totalSupply(), user'sbalanceOf()
Add Liquidity
Select two tokens (or ETH + token)
Enter amounts — the other side auto-calculates to maintain pool ratio
Approve both tokens if needed
Execute
Router.addLiquidity()orRouter.addLiquidityETH()Receive LP tokens proportional to your share
Remove Liquidity
Select a pool where you hold LP tokens
Enter amount to withdraw (or percentage)
Approve LP token spending
Execute
Router.removeLiquidity()orRouter.removeLiquidityETH()Receive both underlying tokens back
Create New Pool
If a pair doesn't exist, the first liquidity provision creates it automatically via the Factory.
Special: Direct Mint Path
For dust pairs (WETH/LINK, OEC/WETH) with minimal locked liquidity, the page supports a direct mint path that bypasses the Router:
Transfer token A to pair contract
Transfer token B to pair contract
Call
pair.mint()
Includes auto-skim recovery on failure and ETH wrapping support.
Pool Data Displayed
Token pair
pair.token0() / token1()
Reserves
pair.getReserves()
Total LP supply
pair.totalSupply()
Your LP balance
pair.balanceOf(wallet)
Your pool share
balance / totalSupply × 100%
Last updated