Loading video player...
HieroForge is a full-stack concentrated liquidity AMM built natively for Hedera — bringing Uniswap V4-style architecture to HTS tokens and ERC-20s, live on Hedera Testnet (Chain 296). In this video, you'll see: ⚡ Swapping tokens via UniversalRouter (V4_SWAP command → PoolManager → flash accounting settle/take) 💧 Adding concentrated liquidity in a custom tick range — minted as an ERC-721 NFT position 📊 Getting price quotes off-chain via V4Quoter (revert-and-parse pattern, zero state change) 🔍 Exploring pools & managing positions in the Next.js 15 + React 19 UI with HashPack wallet 🏗️ Full HTS (Hedera Token Service) support via the 0x167 precompile alongside ERC-20 tokens ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔗 DEPLOYED CONTRACTS (Hedera Testnet) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ PoolManager: 0x3F3ED4342339DB8216734E6B8Df467e5e533EE98 PositionManager: 0x97DfF8C7C7ec86A0667C65fd9D731516B42d4d86 UniversalRouter: 0x613b73d632C675211F0B669b3d5c0B76D74B94F0 V4Quoter: 0x8Bec1cE092C9852BB15670B03C618D34db80a205 HieroForgeV4Pos: 0x03401a54406740040d34ee3d698064f7199a535d TWAP Hook: 0x3752B89d43262fC9B4A4664e18c856dABd636DE2 HashScan Explorer: https://hashscan.io/testnet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🏗️ ARCHITECTURE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ • Singleton PoolManager — all pools in one contract, no factory per pair • Lock/Unlock + Flash Accounting — transient storage deltas, tokens move once per batch • Concentrated Liquidity — LP tick ranges, TickMath / SqrtPriceMath / SwapMath • NFT Positions — ERC-721 via PositionManager + optional HTS NFT collection • UniversalRouter — command-dispatch for V4_SWAP + V4_POSITION_CALL + SWEEP • HTS Native — token detection + creation via 0x167 precompile (IHederaTokenService) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛠️ TECH STACK ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Solidity ^0.8.13 · Foundry (Forge/Cast) · EVM Cancun (tstore/tload) Hedera Testnet (Chain 296) · HTS Precompile (0x167) Next.js 15 · React 19 · TypeScript · Tailwind CSS v4 HashConnect 3.0 · WalletConnect · HashPack viem 2.46.3 · @hashgraph/sdk 2.80 AWS DynamoDB · Hedera Mirror Node ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📁 REPO & DOCS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GitHub: https://github.com/NirajBhattarai/hieroforge Architecture: architecture/README.md (Mermaid diagrams, sequence flows) Core README: hieroforge-core/README.md Periphery: hieroforge-periphery/README.md UI Setup: ui/README.md ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔧 QUICK START ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ git clone https://github.com/NirajBhattarai/hieroforge cd HieroForge && git submodule update --init --recursive cd hieroforge-core && forge build && forge test cd ../hieroforge-periphery && forge test --ffi cd ../ui && npm install && npm run dev ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 👤 ABOUT ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Built by Niraj Bhattarai — blockchain developer from Nepal. Twitter/X: https://twitter.com/nirajbhattara1 GitHub: https://github.com/NirajBhattarai Website: https://nirajbhattarai.me ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⏱️ CHAPTERS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0:00 Intro — What is HieroForge? 0:30 Architecture Overview (PoolManager, Router, Quoter) 1:00 Connecting HashPack Wallet 1:20 Exploring Pools 1:45 Getting a Quote (V4Quoter) 2:10 Executing a Swap (UniversalRouter → PoolManager) 2:50 Adding Concentrated Liquidity (tick range, NFT mint) 3:30 Viewing Positions 4:00 HTS Token Support 4:30 Repo Walkthrough (hieroforge-core, periphery, ui) 5:30 Outro & Links ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ #Hedera #HederaHashgraph #DeFi #AMM #ConcentratedLiquidity #UniswapV4 #HTS #Solidity #Web3 #SmartContracts #Blockchain #HederaTestnet #HashPack #Foundry #DeFiDev #NFT #LiquidityPool #EVM #Cryptocurrency #BlockchainDev #HieroForge