The Cabal Docs
  • The Cabal - Token Launch Platform
  • ⚙️ How It Works
  • 🎁 Claiming Creator Rewards
  • 💰 Protocol Fees
  • 🧱 Cabal Protocol: Contract Overview
    • 💠 CabalToken
    • 🏭 CabalFactory
    • 🛠️ CabalV3Helpers
    • 🔐 CabalLiquidityLocker
    • ⚙️ CabalV4Helpers
    • 🔐 CabalV4LiquidityLocker
    • 🧪 V4LiquidityHelpers
    • 📍 Latest Deployment Addresses (Base Mainnet)
  • 🤝 Stay Connected
Powered by GitBook
On this page
  • 📦 Responsibilities
  • 💧 V4 Liquidity Flow
  • 🔁 Developer Buy Logic
  • 🛡️ Security & Access
  • ✨ Events
  • 🔍 Summary
Export as PDF
  1. 🧱 Cabal Protocol: Contract Overview

⚙️ 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

  1. Token is transferred to V4LiquidityHelpers

  2. Liquidity setup is triggered using tick-based price range

  3. LP NFT is minted using PoolManager

  4. NFT is locked in CabalV4LiquidityLocker with a 5-year lock and 50% protocol fee


🔁 Developer Buy Logic

  • ETH sent to CabalV4Helpers

  • _executeV4Swap() constructs PoolKey and invokes unlock()

  • unlockCallback() triggers the actual swap() via PoolManager

  • Token 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 operations

  • Permit2 and UniversalRouter 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.

Previous🔐 CabalLiquidityLockerNext🔐 CabalV4LiquidityLocker

Last updated 8 days ago