Core Overview
Contract Summary
Contract
Purpose
Source
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ VinuSwapFactory │
│ - createPool() │
│ - getPool() │
│ - owner management │
└──────────────────────────┬──────────────────────────────────────┘
│
│ creates via VinuSwapPoolDeployer
▼
┌─────────────────────────────────────────────────────────────────┐
│ VinuSwapPool │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Slot0 │ │ Positions │ │
│ │ sqrtPriceX96 │ │ owner→liquidity │ │
│ │ tick │ │ feeGrowthInside │ │
│ │ observationIdx │ │ │ │
│ │ feeProtocol │ │ │ │
│ └──────────────────┘ └──────────────────┘ │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Ticks │ │ Observations │ │
│ │ liquidityDelta │ │ tickCumulative │ │
│ │ feeGrowthOut │ │ secondsPerLiq │ │
│ └──────────────────┘ └──────────────────┘ │
│ │
│ Core Functions: │
│ - initialize() - swap() - mint() - burn() │
│ - collect() - observe() │
└─────────────────────────────────────────────────────────────────┘Key Differences from Uniswap V3
1. Fee Manager Integration
2. Owner-Only Pool Creation
3. Flexible Tick Spacing
Immutable Pool Parameters
Parameter
Description
Pool State Variables
Slot0
Global Fee Accumulators
Protocol Fees
Liquidity
Security Features
Reentrancy Protection
Delegatecall Prevention
Events
Pool Events
Event
Emitted When
Factory Events
Event
Emitted When
Error Messages
Error
Meaning
Next Steps
Last updated