⚙️ CabalV4Helpers
The CabalV4Helpers contract is responsible for orchestrating liquidity deployment and developer buy logic using the Uniswap V4 PoolManager architecture.
It provides a factory-locked interface for initializing LP positions, executing secure swaps, and coordinating with the CabalV4LiquidityLocker for NFT-based locking and protocol fee enforcement.
📦 Responsibilities
Initiates one-sided liquidity provisioning for new tokens
Executes developer ETH buys with V4's swap system
Manages unlock callbacks for swap execution
Integrates with CabalV4LiquidityLocker for NFT locking
Handles protocol fee sharing and event tracking
💧 V4 Liquidity Flow
Token is transferred to V4LiquidityHelpers
Liquidity setup is triggered using tick-based price range
LP NFT is minted using PoolManager
NFT is locked in CabalV4LiquidityLocker with a 5-year lock and 50% protocol fee
🔁 Developer Buy Logic
ETH sent to
CabalV4Helpers
_executeV4Swap()
constructsPoolKey
and invokesunlock()
unlockCallback()
triggers the actualswap()
via PoolManagerToken output is delivered to the deployer
If the swap fails, the ETH is refunded
🛡️ Security & Access
Only the CabalFactory can call liquidity or swap functions
ReentrancyGuard
is used for safe operationsPermit2
andUniversalRouter
are integrated for approvals
✨ Events
FactoryUpdated
V4DevBuyExecuted
🔍 Summary
Feature
Value
Pool Fee
1% (10000)
Lock Period
5 years
Protocol Fee Cut
50% (500 bps)
Swap Price Limit
TickMath-based sqrt ratios
NFT Locker
CabalV4LiquidityLocker
CabalV4Helpers abstracts the V4 complexity into a seamless experience, enabling precise, trustless deployments.
Last updated