Technical nature of HELLO DEX
Hello DEX: Architecture & Smart Contract Ecosystem
Introduction
HELLO DEX represents a next-generation decentralized exchange protocol that builds upon the concentrated liquidity model pioneered by Uniswap V3. With its modular architecture and advanced capital efficiency, Hello DEX empowers liquidity providers and traders with customizable pricing ranges, reduced slippage, and capital-efficient liquidity provisioning. Its smart contract ecosystem is composed of robust, gas-optimized components separated into Core, Periphery, Governance, and Utility layers, alongside a dedicated LP Locker module that enhances trust and security within the ecosystem.
Core Protocol Architecture
HELLO DEX employs a core/periphery model designed to optimize gas efficiency, maintain modularity, and ensure long-term upgradeability.
Core Contracts
HELLOSwapV3Factory The central registry responsible for deploying and tracking all liquidity pools. Each unique combination of token pair and fee tier maps to a single deterministic pool address, preventing duplication and ensuring clean liquidity routing.
HELLOSwapV3Pool Implements the protocol’s core AMM logic. Supports customizable liquidity positions through functions and facilitates token swaps with precision and oracle observation tools.
HELLOSwapV3PoolDeployer A lightweight deployer contract that ensures efficient and consistent deployment of pool instances using the minimal proxy pattern.
Periphery Contracts
NonfungiblePositionManager Encapsulates liquidity positions into ERC-721 NFTs. This abstraction makes range-based LP management more accessible to users while enabling further composability (e.g., staking NFTs for incentives).
SwapRouter A sophisticated trading interface that facilitates both single-hop and multi-hop swaps with optimized execution paths.
Quoter A read-only utility that simulates swaps to estimate prices and slippage without on-chain execution, enabling accurate price prediction in dApps and UI layers.
TickLens Enables efficient querying of tick-level liquidity data for visual analytics and strategy optimization tools.
Liquidity Incentives & Governance
HELLOSwapV3Staker The incentives engine of HELLO DEX. This module allows protocol governance to direct rewards to specific pools, encouraging deep liquidity where it matters most. Users lock their NFT positions to participate in reward programs and claim accumulated tokens.
Utility Libraries
To ensure mathematical correctness and computational efficiency, HELLO DEX utilizes several utility libraries:
FullMath for full-precision 512-bit multiplication and division
TickMath for conversions between price ticks and sqrtPriceX96 format
LiquidityMath for accurate liquidity delta calculations
Oracle for secure and gas-efficient TWAP (time-weighted average price) observation
HELLO DEX LP Locker
As a complement to Hello DEX's trading and liquidity provisioning system, the HELLO DEX LP Locker introduces a mechanism to lock Uniswap V3-style liquidity positions, represented as NFTs, for a predefined period. This is especially useful for projects that require commitment from LPs or want to demonstrate locked liquidity for trust-building purposes.
Key Features
NFT-Based Locking: LP positions are locked via their ERC-721 token ID
Time-Locked Access: Liquidity is non-withdrawable until a specified future timestamp
Non-Custodial by Design: Although NFTs are held during the lock period, the contract cannot access the underlying liquidity
Fee-Driven Service: A configurable USDT fee (default 100 USDT) is required per lock operation
Emergency Safeguards: Admin tools allow for rescue of mis-sent tokens and management of protocol fees
User Flow
Mint LP NFT via HELLO DEX
Approve NFT and USDT for locker contract
Calls function and pay the fee
Upon expiry, call functions to reclaim NFT
Governance & Owner Controls
Contract owner can update the locking fee and withdraw accumulated USDT fees
Emergency function allows recovery of tokens sent to the contract by mistake
Security Considerations
Hello DEX contracts are developed with security and modularity at the forefront:
Reentrancy Guards on critical functions
Strict Access Controls and identity mapping
Immutable Pool Logic to prevent unauthorized alterations
Oracle Observation System for secure off-chain data fetching
Liquidity Provider (LP) Fee Mechanism
Fee Accumulation
Fees are collected during each swap and tracked globally.
Each pool tracks fees separately based on its configured fee tier.
Range-Based Earnings
LPs earn fees only when the active price is within their selected tick range, or full range.
Out-of-range liquidity does not accrue fees.
Fee Tracking & Calculation
Each position uses a feeGrowthInside metric.
Fees are calculated by comparing global pool fee growth with individual position growth.
Fee Collection Process
LPs can claim accrued fees by adjusting liquidity or burning their position NFT.
Fees are transferred directly to the LP’s wallet.
All pending fees are transparently displayed in the HelloSwap UI for both tokens in the pool.
Protocol Fee Mechanism
Fee Calculation
The protocol captures 40–50% of swap fees depending on the pool’s tier.
This share is embedded in each pool contract and tracked automatically.
Auto-Forwarding
Once fees exceed an internal threshold of $100, they're auto-forwarded to a central protocol contract.
This is a trustless process—executed entirely via pool logic.
Protocol Fee Handling & Distribution
A monitoring system tracks token balances across pools.
When a non-USDT token exceeds a value of $50, it is automatically converted to USDT via a Node.js monitoring script.
Upon reaching a USDT balance of $100, funds are distributed as follows:
15%: Used to buy and burn $HELLO (sent to a burn address)
25%: Sent to the HelloSwap treasury wallet
60%: Sent to the staking pool contract
Full Automation
From fee accumulation to conversion and final distribution, the entire process is fully automated, with no manual intervention required.
Last updated