Github Repositories
The PookaFinance project is organized into the following repositories:
Frontend Application
Repository: https://github.com/Dhruv-Varshney-developer/pooka-finance-app
The frontend provides the user interface for interacting with the PookaFinance perpetual trading platform.
Tech Stack:
Next.js: React-based framework for optimized performance and routing
Sass: For modular and scalable styling
Zustand: Lightweight state management for handling positions, balances, and global app state
LiveCharts: Integrated trading chart visuals (similar to TradingView) for real-time market data and technical analysis
Wallet Integration: Supports multiple wallet providers for seamless interaction with connected blockchains
Features:
Open, manage, and close cross-chain perpetual positions
Live position tracking and historical charts
Responsive and intuitive UI/UX optimized for DeFi users
Eliza Agent (AI Assistant) https://github.com/Devanshgoel-123/AgenticBackendPooka This intelligent agent interprets user prompts in natural language and maps them to actionable intents like opening or closing a position.
Responsibilities:
Understands and processes user input using Anthropic's Claude API
Delegates trading actions to the Node backend via WebSocket
Maintains a character-driven conversational interface
Actions Supported:
openPosition
closePosition
depositPosition
withdrawPosition
Smart Contracts https://github.com/Dhruv-Varshney-developer/pooka-finance-contracts
A comprehensive suite of Solidity-based contracts responsible for the core protocol logic and cross-chain functionality.
Core Trading Infrastructure:
Perps.sol - Main perpetual trading engine handling position management, liquidations, and user limits
PerpsCalculations.sol - Risk calculation engine for P&L, liquidation prices, and margin monitoring
PerpsFeeManager.sol - Fee structure management (opening, closing, holding fees, profit taxation)
PriceOracle.sol - Chainlink price feed integration supporting BTC/USD, ETH/USD, AVAX/USD, LINK/USD
Cross-Chain Infrastructure:
CrossChainManager.sol - CCIP-based bridge for seamless asset transfers from Ethereum to Avalanche
PoolManager.sol - Multi-token deposit handler that accepts AVAX, LINK, and USDC, converting all to unified USDC trading
Automation & Fairness:
VRFRandomizer.sol - Chainlink VRF integration ensuring fair liquidation ordering.
VRFAutomation.sol - Automated VRF randomness refresh every 6 hours
TimeLiquidationAutomation.sol - Time-based position monitoring and liquidation triggers
LogLiquidationAutomation.sol - Event-based liquidation monitoring for immediate response
Data Structures:
PerpsStructs.sol - Shared data structures for positions, markets, deposits, and user information
These contracts form the trustless foundation of the PookaFinance ecosystem and are deployed across supported chains.
Last updated