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
  • ๐Ÿ› ๏ธ CabalV3Helpers
  • ๐Ÿ”ง Responsibilities
  • ๐Ÿ’ธ Key Logic
  • ๐Ÿง  Technical Design
  • โš™๏ธ Parameters and Settings
  • ๐Ÿ” Access Control
  • ๐Ÿšจ Emergency Tools
  • ๐Ÿ“ˆ Events
  • ๐Ÿ” Summary
Export as PDF
  1. ๐Ÿงฑ Cabal Protocol: Contract Overview

๐Ÿ› ๏ธ CabalV3Helpers

๐Ÿ› ๏ธ CabalV3Helpers

The CabalV3Helpers contract is a powerful internal tool used by The Cabal platform to handle all aspects of Uniswap V3 liquidity deployment.

It abstracts away complex pool creation, position minting, and liquidity locking into a single secure module, and is only callable by the CabalFactory to prevent misuse.


๐Ÿ”ง Responsibilities

  • Deploy one-sided liquidity to Uniswap V3

  • Create and initialize new Uniswap V3 pools if needed

  • Mint positions using custom tick pricing

  • Lock LP NFTs into the CabalLiquidityLocker

  • Handle developer ETH buys through V3 swap router

  • Maintain full safety with nonReentrant and onlyFactory restrictions


๐Ÿ’ธ Key Logic

deployV3Liquidity()

Deploys liquidity for a token with:

  • Token amount input

  • Initial tick pricing for pool

  • Automatic LP NFT creation

  • LP NFT is locked immediately via initializePosition() if recipient is the locker

Returns:

  • poolAddress: the deployed or existing Uniswap V3 pool

  • tokenId: the LP NFT minted

executeV3DeveloperBuy()

Performs a Uniswap V3 ETH-to-token swap using the SwapRouter:

  • Buys tokens for the deployer

  • Sends tokens to recipient

  • Refunds ETH if swap fails


๐Ÿง  Technical Design

  • Uses adjustedTick logic to support both token0/token1 configurations

  • Calculates sqrtPriceX96 from ticks using CabalV3TickMath

  • Supports tick validation with spacing checks

  • Provides internal _mintPosition() logic


โš™๏ธ Parameters and Settings

Setting
Value

Default Pool Fee

10000 (1%)

Default Lock Period

1825 days (5 years)

Default LP Fee Cut

500 (50%)

ETH Token Address (Base)

0x4200...0006


๐Ÿ” Access Control

  • deployV3Liquidity() and executeV3DeveloperBuy() are only callable by the factory

  • Factory must be set once by the owner using setFactory()


๐Ÿšจ Emergency Tools

  • emergencyRecoverToken() โ€” withdraw stuck ERC-20s

  • emergencyRecoverETH() โ€” withdraw stuck ETH


๐Ÿ“ˆ Events

  • PoolCreated

  • LiquidityAdded

  • PositionLocked

  • FactoryUpdated


๐Ÿ” Summary

The CabalV3Helpers contract is the backbone of our V3 deployment pipeline โ€” safely handling liquidity, locking, and developer incentives.

It ensures all launches on The Cabal are:

  • Secure

  • Non-custodial

  • Price controlled

  • Lock-enforced

"Set your price, lock your LP, and let the markets begin โ€” all from one place."


Previous๐Ÿญ CabalFactoryNext๐Ÿ” CabalLiquidityLocker

Last updated 8 days ago

For more, visit or join us on .

https://thecabal.app
Telegram