A Next.js web application for AetherPool, a privacy-preserving multi-LP just-in-time liquidity protocol for Uniswap v4, powered by Fhenix FHE encryption and Reown Wallet Connect.
- Node.js 18+
- npm or yarn
- Reown Wallet Connect Project ID
-
Clone the repository
-
Install dependencies:
npm install --legacy-peer-depsImportant: Always use
--legacy-peer-depsflag when installing packages due to React 19 compatibility with some dependencies.
- Set up environment variables:
cp .env.local.example .env.local
# Edit .env.local with your configuration- Run the development server:
npm run devVisit http://localhost:3000 to see the dashboard.
├── app/
│ ├── api/ # Next.js API routes
│ ├── page.tsx # Main dashboard page
│ └── layout.tsx # Root layout with Web3Provider
├── components/
│ ├── dashboard/ # Dashboard UI components
│ └── web3/ # Web3-related components
├── lib/
│ ├── web3-config.ts # Wagmi and Reown setup
│ ├── web3-provider.tsx # Web3Provider component
│ ├── web3-utils.ts # Web3 utilities and hooks
│ └── contracts.ts # Contract addresses and ABIs
├── contracts/ # Solidity smart contracts
├── public/ # Static files
└── .npmrc # npm configuration (legacy-peer-deps)
- Privacy-First: FHE-encrypted LP strategies
- Multi-LP Coordination: Automatic position overlap detection
- Dynamic Pricing: Gas-responsive fee adjustments
- Dashboard: Real-time liquidity and earnings tracking
- Wallet Integration: Seamless Reown Wallet Connect
- Go to cloud.reown.com
- Create a new project
- Copy your Project ID
- Add it to
.env.localasNEXT_PUBLIC_PROJECT_ID
The Solidity contracts are in the contracts/ directory:
ZKJITLiquidityHook.sol- Main hook implementation
Deploy using Foundry:
forge create contracts/ZKJITLiquidityHook.sol:ZKJITLiquidityHook \
--constructor-args <POOL_MANAGER_ADDRESS>GET /api/positions?address=<wallet_address>
POST /api/positions
{
"address": "0x...",
"poolKey": {...},
"tickLower": -60,
"tickUpper": 60,
"liquidityDelta": "1000000000000000000",
"amount0": "500000000000000000",
"amount1": "500000000000000000"
}
GET /api/jit?address=<wallet_address>
GET /api/stats?address=<wallet_address>
npm run buildnpm run lint- Ethereum Mainnet
- Arbitrum One
- Optimism
- Base
- Polygon
This project uses React 19, which may have peer dependency conflicts with some packages. To avoid installation issues:
-
Always use the
--legacy-peer-depsflag:npm install --legacy-peer-deps npm install <package-name> --legacy-peer-deps
-
Or set it permanently in your local environment: Create/modify
.npmrcin the project root:legacy-peer-deps=true -
Affected packages:
vaul(drawer component) - only supports React 18 officially but works with React 19
If you encounter ERESOLVE unable to resolve dependency tree errors:
- Run
npm install --legacy-peer-deps - Or add
legacy-peer-deps=trueto your.npmrcfile - Do not use
--forceas it may cause breaking changes
You may see warnings about low severity vulnerabilities after installation. To fix them:
npm audit fix --legacy-peer-depsThese are typically not critical for development but should be reviewed before production deployment.
- FHE encryption protects all LP parameters
- Access control on all position modifications
- Economic security via EigenLayer-style operator staking
- Regular security audits recommended
MIT
For support, email support@aetherpool.io or open an issue on GitHub.
We welcome contributions! Please ensure you:
- Use
npm install --legacy-peer-depsfor all package installations - Follow the existing code style and conventions
- Test your changes thoroughly
- Update documentation as needed
- Submit pull requests with clear descriptions
For major changes, please open an issue first to discuss what you would like to change.